diff --git a/db/migrate/20200910205316_remove_active_from_profile_fields2.rb b/db/migrate/20200910205316_remove_active_from_profile_fields2.rb new file mode 100644 index 000000000..a8e98d327 --- /dev/null +++ b/db/migrate/20200910205316_remove_active_from_profile_fields2.rb @@ -0,0 +1,13 @@ +class RemoveActiveFromProfileFields2 < ActiveRecord::Migration[6.0] + def up + return unless column_exists?(:profile_fields, :active) + + safety_assured { remove_column :profile_fields, :active } + end + + def down + return if column_exists?(:profile_fields, :active) + + add_column :profile_fields, :active, :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index 9b739972a..adc1103cc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_09_04_151734) do +ActiveRecord::Schema.define(version: 2020_09_10_205316) do # These are extensions that must be enabled in order to support this database enable_extension "citext"