All data on checks are now set up.
This commit is contained in:
15
migrator/migrations/1526611275-DOWN-move-address-to-data.sql
Normal file
15
migrator/migrations/1526611275-DOWN-move-address-to-data.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- 1526611275 DOWN move-address-to-data
|
||||
alter table vendors
|
||||
add column address1 varchar (255);
|
||||
|
||||
alter table vendors
|
||||
add column address2 varchar (255);
|
||||
|
||||
alter table vendors
|
||||
add column city varchar (255);
|
||||
|
||||
alter table vendors
|
||||
add column state varchar (255);
|
||||
|
||||
alter table vendors
|
||||
add column zip varchar (255);
|
||||
18
migrator/migrations/1526611275-UP-move-address-to-data.sql
Normal file
18
migrator/migrations/1526611275-UP-move-address-to-data.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- 1526611275 UP move-address-to-data
|
||||
UPDATE vendors v
|
||||
set data = CONCAT('{ '
|
||||
, ' :address { '
|
||||
, ' :street1 "' , v.address1 , '" '
|
||||
, ' :street2 "' , v.address2 , '" '
|
||||
, ' :city "' , v.city , '" '
|
||||
, ' :state "' , v.state , '" '
|
||||
, ' :zip "' , v.zip , '" '
|
||||
, ' }'
|
||||
, ' }');
|
||||
|
||||
|
||||
alter table vendors drop column address1;
|
||||
alter table vendors drop column address2;
|
||||
alter table vendors drop column city;
|
||||
alter table vendors drop column state;
|
||||
alter table vendors drop column zip;
|
||||
Reference in New Issue
Block a user