mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 12:39:34 +02:00
Story#116761157 - set contact nil statuses to empty array as default
This commit is contained in:
parent
01234e3c55
commit
34ef156484
1 changed files with 1 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
class ChangeContactStatusesDefault < ActiveRecord::Migration
|
class ChangeContactStatusesDefault < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
change_column_default :contacts, :statuses, []
|
change_column_default :contacts, :statuses, []
|
||||||
|
Contact.where(statuses: nil). update_all(statuses: [])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue