Adds migrations for renaming and new flagging field

* inappropiate_flags table becomes flags
* [comments|debates].archived_at becomes flag_ignored_at
* Add new [comments|debates].hide_reviewed_at
This commit is contained in:
kikito
2015-08-27 10:11:45 +02:00
parent 9ab13abf20
commit b9dce31a4d
4 changed files with 39 additions and 20 deletions

View File

@@ -0,0 +1,5 @@
class RenameInappropiateFlagsAsFlags < ActiveRecord::Migration
def change
rename_table :inappropiate_flags, :flags
end
end

View File

@@ -0,0 +1,6 @@
class RenameArchivedAtToFlagIgnoredAtInCommentsAndDebates < ActiveRecord::Migration
def change
rename_column :comments, :archived_at, :flag_ignored_at
rename_column :debates, :archived_at, :flag_ignored_at
end
end

View File

@@ -0,0 +1,6 @@
class AddHideReviewedAtToCommentsAndDebates < ActiveRecord::Migration
def change
add_column :debates, :hide_reviewed_at, :datetime
add_column :comments, :hide_reviewed_at, :datetime
end
end