mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 12:37:56 +00:00
chore: Add migration to set the default empty string value for contact name (#7052)
Fixes: https://linear.app/chatwoot/issue/CW-1650/issue-with-the-contact-name
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
# email :string
|
# email :string
|
||||||
# identifier :string
|
# identifier :string
|
||||||
# last_activity_at :datetime
|
# last_activity_at :datetime
|
||||||
# name :string
|
# name :string default("")
|
||||||
# phone_number :string
|
# phone_number :string
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class SetDefaultEmptyStringForContactName < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
change_column_default :contacts, :name, from: nil, to: ''
|
||||||
|
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: 2023_05_10_060828) do
|
ActiveRecord::Schema[7.0].define(version: 2023_05_10_113208) 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"
|
||||||
@@ -394,7 +394,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_10_060828) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
create_table "contacts", id: :serial, force: :cascade do |t|
|
create_table "contacts", id: :serial, force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name", default: ""
|
||||||
t.string "email"
|
t.string "email"
|
||||||
t.string "phone_number"
|
t.string "phone_number"
|
||||||
t.integer "account_id", null: false
|
t.integer "account_id", null: false
|
||||||
|
|||||||
Reference in New Issue
Block a user