mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-08 22:58:08 -05:00
This is not (and as far as I know, was never) used. If we want to make standalone photos commentable, we can always add it back, but it would also need to change federation for it to work, because comments support only posts there. But for now it makes the code cleaner and easier to remove it.
15 lines
320 B
Ruby
15 lines
320 B
Ruby
# frozen_string_literal: true
|
|
|
|
class PhotosRemoveCommentCount < ActiveRecord::Migration[5.1]
|
|
class Comment < ApplicationRecord
|
|
end
|
|
|
|
def change
|
|
remove_column :photos, :comments_count, :integer
|
|
|
|
reversible do |change|
|
|
change.up { Comment.where(commentable_type: "Photo").delete_all }
|
|
end
|
|
end
|
|
end
|