adding new companies
This commit is contained in:
1
migrator/migrations/1534475443-DOWN-update-companies.sql
Normal file
1
migrator/migrations/1534475443-DOWN-update-companies.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- 1534475443 DOWN update-companies
|
||||
24
migrator/migrations/1534475443-UP-update-companies.sql
Normal file
24
migrator/migrations/1534475443-UP-update-companies.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- 1534475443 UP update-companies
|
||||
DELETE FROM companies where code in
|
||||
('BES', 'BSA', 'HM', 'FCF', 'INT', 'JS', 'MV', 'ORA', 'SK', 'SLO', 'WE');
|
||||
|
||||
INSERT INTO companies (code, name, data)
|
||||
VALUES
|
||||
('BES', 'Brian & Erin Skarbek', '{:locations ["CB"] }'),
|
||||
('BSA', 'Be Steak A', '{:locations ["CB"] }'),
|
||||
('HM', 'Hiro Mura', '{:locations ["SV"] }'),
|
||||
('FCF', 'Frost Cupcake Factory', '{:locations ["CB"] }'),
|
||||
('INT', 'Integreat', '{:locations ["CB"] }'),
|
||||
('JS', 'Jason Skarbek', '{:locations ["CB"] }'),
|
||||
('MV', 'Mio Vicino - Santa Clara', '{:locations ["SC"] }'),
|
||||
('ORA', 'Orale''s', '{:locations ["CB"] }'),
|
||||
('SK', 'Savory Kitchen', '{:locations ["AL"] }'),
|
||||
('SLO', 'Skarbek Law Offices', '{:locations ["CB"] }'),
|
||||
('WE', 'Warm Elements', '{:locations ["CB"] }');
|
||||
|
||||
DELETE FROM invoices_expense_accounts where invoice_id in (select id from invoices where company_id in (select id from companies where name in ('Knock Out Grill & Bar', 'Nasch Bistro', 'Naschmarkt', 'The Socialight')));
|
||||
DELETE FROM invoices_checks where invoice_id in (select id from invoices where company_id in (select id from companies where name in ('Knock Out Grill & Bar', 'Nasch Bistro', 'Naschmarkt', 'The Socialight')));
|
||||
|
||||
DELETE FROM invoices where company_id in (select id from companies where name in ('Knock Out Grill & Bar', 'Nasch Bistro', 'Naschmarkt', 'The Socialight'));
|
||||
DELETE FROM checks where company_id in (select id from companies where name in ('Knock Out Grill & Bar', 'Nasch Bistro', 'Naschmarkt', 'The Socialight'));
|
||||
DELETE FROM companies where name in ('Knock Out Grill & Bar', 'Nasch Bistro', 'Naschmarkt', 'The Socialight');
|
||||
Reference in New Issue
Block a user