,tlc_branch_id TEXT
,tlc_name TEXT
,org_unit TEXT
+ ,mig_patrons TEXT
+ ,mig_items TEXT
,note TEXT
,x_org_id INTEGER
+
);
INSERT INTO gsheet_tracked_table
,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Branches Present in Extract'),'tlc_name')
,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Branches Present in Extract'),'org_unit')
,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Branches Present in Extract'),'note')
+ ,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Branches Present in Extract'),'mig_patrons')
+ ,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Branches Present in Extract'),'mig_items')
;
-- ############################################
CREATE TABLE map_tlc_billing_type (
id SERIAL
,x_count TEXT
+ ,tlc_code TEXT
,billing_type TEXT
,dnm TEXT
,note TEXT
(table_id,column_name)
VALUES
((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Migrating Bills by Bill Type'),'x_count')
+ ,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Migrating Bills by Bill Type'),'tlc_code')
,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Migrating Bills by Bill Type'),'billing_type')
,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Migrating Bills by Bill Type'),'dnm')
,((SELECT id FROM gsheet_tracked_table WHERE tab_name = 'Migrating Bills by Bill Type'),'note')
,alert_message TEXT
,dnm TEXT
,note TEXT
+ ,reference TEXT
+ ,item_status TEXT
+ ,stat_cat_title TEXT
+ ,stat_cat_entry TEXT
+ ,x_migrate TEXT
);
INSERT INTO gsheet_tracked_table