diff options
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20190519130537_remove_boosts_widening_audience.rb | 2 | ||||
-rw-r--r-- | db/post_migrate/20190728084117_remove_uri_from_conversations.rb | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb b/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb index d2d924239..b89efd989 100644 --- a/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb +++ b/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RemoveBoostsWideningAudience < ActiveRecord::Migration[5.2] disable_ddl_transaction! diff --git a/db/post_migrate/20190728084117_remove_uri_from_conversations.rb b/db/post_migrate/20190728084117_remove_uri_from_conversations.rb new file mode 100644 index 000000000..b2b157ef7 --- /dev/null +++ b/db/post_migrate/20190728084117_remove_uri_from_conversations.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class RemoveUriFromConversations < ActiveRecord::Migration[5.2] + def up + safety_assured { remove_column :conversations, :uri, :string } + end + + def down + add_column :conversations, :uri, :string + add_index :conversations, :uri, unique: true + end +end |