choore: Change values
to attribute_values
in custom attributes (#3413)
This commit is contained in:
parent
a3ba8f9e35
commit
bf96e8b68d
5 changed files with 10 additions and 4 deletions
|
@ -39,7 +39,7 @@ class Api::V1::Accounts::CustomAttributeDefinitionsController < Api::V1::Account
|
||||||
:attribute_display_type,
|
:attribute_display_type,
|
||||||
:attribute_key,
|
:attribute_key,
|
||||||
:attribute_model,
|
:attribute_model,
|
||||||
:default_value
|
attribute_values: []
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
# attribute_display_type :integer default("text")
|
# attribute_display_type :integer default("text")
|
||||||
# attribute_key :string
|
# attribute_key :string
|
||||||
# attribute_model :integer default("conversation_attribute")
|
# attribute_model :integer default("conversation_attribute")
|
||||||
|
# attribute_values :jsonb
|
||||||
# default_value :integer
|
# default_value :integer
|
||||||
# values :jsonb
|
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# account_id :bigint
|
# account_id :bigint
|
||||||
|
|
|
@ -3,6 +3,7 @@ json.attribute_display_name resource.attribute_display_name
|
||||||
json.attribute_display_type resource.attribute_display_type
|
json.attribute_display_type resource.attribute_display_type
|
||||||
json.attribute_description resource.attribute_description
|
json.attribute_description resource.attribute_description
|
||||||
json.attribute_key resource.attribute_key
|
json.attribute_key resource.attribute_key
|
||||||
|
json.attribute_values resource.attribute_values
|
||||||
json.attribute_model resource.attribute_model
|
json.attribute_model resource.attribute_model
|
||||||
json.default_value resource.default_value
|
json.default_value resource.default_value
|
||||||
json.created_at resource.created_at
|
json.created_at resource.created_at
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class ChangeValuesToAttributeValuesInCustomAttributeDefinitions < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
rename_column :custom_attribute_definitions, :values, :attribute_values
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2021_11_16_131740) do
|
ActiveRecord::Schema.define(version: 2021_11_18_100301) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pg_stat_statements"
|
enable_extension "pg_stat_statements"
|
||||||
|
@ -355,7 +355,7 @@ ActiveRecord::Schema.define(version: 2021_11_16_131740) do
|
||||||
t.datetime "created_at", precision: 6, null: false
|
t.datetime "created_at", precision: 6, null: false
|
||||||
t.datetime "updated_at", precision: 6, null: false
|
t.datetime "updated_at", precision: 6, null: false
|
||||||
t.text "attribute_description"
|
t.text "attribute_description"
|
||||||
t.jsonb "values", default: []
|
t.jsonb "attribute_values", default: []
|
||||||
t.index ["account_id"], name: "index_custom_attribute_definitions_on_account_id"
|
t.index ["account_id"], name: "index_custom_attribute_definitions_on_account_id"
|
||||||
t.index ["attribute_key", "attribute_model"], name: "attribute_key_model_index", unique: true
|
t.index ["attribute_key", "attribute_model"], name: "attribute_key_model_index", unique: true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue