mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
feat: Add middle_name and last_name to contact model (#8771)
feat: Add `middle_name` and `last_name`
This commit is contained in:
@@ -11,6 +11,8 @@
|
|||||||
# email :string
|
# email :string
|
||||||
# identifier :string
|
# identifier :string
|
||||||
# last_activity_at :datetime
|
# last_activity_at :datetime
|
||||||
|
# last_name :string default("")
|
||||||
|
# middle_name :string default("")
|
||||||
# name :string default("")
|
# name :string default("")
|
||||||
# phone_number :string
|
# phone_number :string
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class AddMiddleNameAndLastNameToContacts < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :contacts, :middle_name, :string, default: ''
|
||||||
|
add_column :contacts, :last_name, :string, default: ''
|
||||||
|
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[7.0].define(version: 2024_01_24_054340) do
|
ActiveRecord::Schema[7.0].define(version: 2024_01_24_084032) 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"
|
||||||
enable_extension "pg_trgm"
|
enable_extension "pg_trgm"
|
||||||
@@ -419,6 +419,8 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_24_054340) do
|
|||||||
t.jsonb "custom_attributes", default: {}
|
t.jsonb "custom_attributes", default: {}
|
||||||
t.datetime "last_activity_at", precision: nil
|
t.datetime "last_activity_at", precision: nil
|
||||||
t.integer "contact_type", default: 0
|
t.integer "contact_type", default: 0
|
||||||
|
t.string "middle_name", default: ""
|
||||||
|
t.string "last_name", default: ""
|
||||||
t.index "lower((email)::text), account_id", name: "index_contacts_on_lower_email_account_id"
|
t.index "lower((email)::text), account_id", name: "index_contacts_on_lower_email_account_id"
|
||||||
t.index ["account_id", "email", "phone_number", "identifier"], name: "index_contacts_on_nonempty_fields", where: "(((email)::text <> ''::text) OR ((phone_number)::text <> ''::text) OR ((identifier)::text <> ''::text))"
|
t.index ["account_id", "email", "phone_number", "identifier"], name: "index_contacts_on_nonempty_fields", where: "(((email)::text <> ''::text) OR ((phone_number)::text <> ''::text) OR ((identifier)::text <> ''::text))"
|
||||||
t.index ["account_id"], name: "index_contacts_on_account_id"
|
t.index ["account_id"], name: "index_contacts_on_account_id"
|
||||||
|
|||||||
Reference in New Issue
Block a user