[deploy] Stop using ProfileField#active Part 2 (#9911)

* Remove ProfileField#active

* Add schema.rb
This commit is contained in:
Michael Kohl 2020-08-24 13:13:51 +07:00 committed by GitHub
parent 7f0b515e85
commit 1f66056f28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -1,6 +1,4 @@
class ProfileField < ApplicationRecord
self.ignored_columns = ["active"]
before_create :generate_attribute_name
WORD_REGEX = /\w+/.freeze

View file

@ -0,0 +1,7 @@
class RemoveActiveFromProfileField < ActiveRecord::Migration[6.0]
def change
def change
safety_assured { remove_column :profile_fields, :active }
end
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_08_20_093752) do
ActiveRecord::Schema.define(version: 2020_08_21_035520) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
@ -933,7 +933,6 @@ ActiveRecord::Schema.define(version: 2020_08_20_093752) do
end
create_table "profile_fields", force: :cascade do |t|
t.boolean "active", default: true, null: false
t.string "attribute_name", null: false
t.datetime "created_at", precision: 6, null: false
t.string "description"