[deploy] Bug Fix: Add New Migration to Remove Active from Profile Fields (#10279)

This commit is contained in:
Molly Struve 2020-09-11 01:49:27 -05:00 committed by GitHub
parent a6ae0378c5
commit 111dc4ea9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -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

View file

@ -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"