Merge pull request #8039 from SuperTux88/photos-remove-commentable
Remove commentable functionality from photos
This commit is contained in:
commit
e0b8b295df
2 changed files with 14 additions and 1 deletions
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
class Photo < ApplicationRecord
|
||||
include Diaspora::Federated::Base
|
||||
include Diaspora::Commentable
|
||||
include Diaspora::Shareable
|
||||
|
||||
# NOTE API V1 to be extracted
|
||||
|
|
|
|||
14
db/migrate/20190701234716_photos_remove_comment_count.rb
Normal file
14
db/migrate/20190701234716_photos_remove_comment_count.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# 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
|
||||
Loading…
Reference in a new issue