adding x_migrate flag and changing reference to text for defensive input munging
[migration-tools.git] / mig-sql / system / tlc / 030_tlc_mapping_tables.sql
index bef2599..210cc73 100644 (file)
@@ -3,8 +3,11 @@ CREATE TABLE map_tlc_branches (
     ,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
@@ -21,6 +24,8 @@ VALUES
     ,((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')
 ;
 
 -- ############################################
@@ -113,6 +118,7 @@ VALUES
 CREATE TABLE map_tlc_billing_type (
     id                  SERIAL
     ,x_count            TEXT            
+    ,tlc_code           TEXT
     ,billing_type       TEXT
     ,dnm                TEXT
     ,note               TEXT
@@ -128,6 +134,7 @@ INSERT INTO gsheet_tracked_column
     (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')
@@ -238,6 +245,11 @@ CREATE TABLE map_tlc_holding_code (
     ,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