diff --git a/db/migrate/20160223164502_make_uris_nullable_in_statuses.rb b/db/migrate/20160223164502_make_uris_nullable_in_statuses.rb index fff07093c8..ebb572bd60 100644 --- a/db/migrate/20160223164502_make_uris_nullable_in_statuses.rb +++ b/db/migrate/20160223164502_make_uris_nullable_in_statuses.rb @@ -1,7 +1,11 @@ # frozen_string_literal: true class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2] - def change + def up change_column :statuses, :uri, :string, null: true, default: nil end + + def down + raise ActiveRecord::IrreversibleMigration + end end diff --git a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb index b98fffab83..e7fcb75a44 100644 --- a/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb +++ b/db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0] - def change + def up change_table(:statuses, bulk: true) do |t| t.change :id, :bigint t.change :reblog_of_id, :bigint @@ -16,4 +16,8 @@ class ChangePrimaryKeyToBigintOnStatuses < ActiveRecord::Migration[5.0] change_column :statuses_tags, :status_id, :bigint change_column :stream_entries, :activity_id, :bigint end + + def down + raise ActiveRecord::IrreversibleMigration + end end diff --git a/db/migrate/20170609145826_remove_default_language_from_statuses.rb b/db/migrate/20170609145826_remove_default_language_from_statuses.rb index 28b4172a8c..122c322287 100644 --- a/db/migrate/20170609145826_remove_default_language_from_statuses.rb +++ b/db/migrate/20170609145826_remove_default_language_from_statuses.rb @@ -1,7 +1,11 @@ # frozen_string_literal: true class RemoveDefaultLanguageFromStatuses < ActiveRecord::Migration[5.1] - def change + def up change_column :statuses, :language, :string, default: nil, null: true end + + def down + raise ActiveRecord::IrreversibleMigration + end end