From a6380fc77c36b48508cec1718eaaa1eb07ed820b Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 21 Sep 2017 14:11:28 +0630 Subject: [PATCH] update sym master sql --- db/sym_master.sql | 215 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 206 insertions(+), 9 deletions(-) diff --git a/db/sym_master.sql b/db/sym_master.sql index 81d9b77d..bb05a94e 100644 --- a/db/sym_master.sql +++ b/db/sym_master.sql @@ -286,8 +286,8 @@ insert into sym_router values('sx_2_store', 'sx', 'store', 'default',current_timestamp, current_timestamp); insert into sym_router -(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time) -values('store_2_sx', 'store', 'sx', 'default',current_timestamp, current_timestamp); +(router_id,source_node_group_id,target_node_group_id,router_type,sync_on_delete,create_time,last_update_time) +values('store_2_sx', 'store', 'sx', 'default',0,current_timestamp, current_timestamp); -- insert into sym_router -- (router_id,source_node_group_id,target_node_group_id,router_type,router_expression,create_time,last_update_time) @@ -296,7 +296,7 @@ values('store_2_sx', 'store', 'sx', 'default',current_timestamp, current_timesta # Add triggers for tables with router -# Setting Channel +# Setting Channel # From Store to Master insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('lookups','store_2_sx', 100, current_timestamp, current_timestamp); @@ -324,9 +324,39 @@ values('shops','store_2_sx', 100, current_timestamp, current_timestamp); insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('customers','store_2_sx', 100, current_timestamp, current_timestamp); + +# Setting Channel # From Master to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('lookups','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('membership_actions','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('membership_settings','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('payment_method_settings','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('print_settings','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('shops','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('customers','sx_2_store', 100, current_timestamp, current_timestamp); + #End Setting Channel -# Dining Channel +# Dining Channel # From Store to SX insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('zones','store_2_sx', 100, current_timestamp, current_timestamp); @@ -342,9 +372,27 @@ values('dining_facilities','store_2_sx', 100, current_timestamp, current_timesta insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('dining_queues','store_2_sx', 100, current_timestamp, current_timestamp); + +# Dining Channel # From SX to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('zones','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('dining_charges','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('dining_facilities','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('dining_queues','sx_2_store', 100, current_timestamp, current_timestamp); + #end Dining Channel -# Commission/Promotion/Product Channel +# Commission/Promotion/Product Channel # From Store to SX insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('commissioners','store_2_sx', 100, current_timestamp, current_timestamp); @@ -380,9 +428,47 @@ values('promotion_products','store_2_sx', 100, current_timestamp, current_timest insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('promotions','store_2_sx', 100, current_timestamp, current_timestamp); + +# Commission/Promotion/Product Channel # From SX to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('commissioners','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('commissions','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('employees','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('in_duties','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('inventory_definitions','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('product_commissions','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('products','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('promotion_products','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('promotions','sx_2_store', 100, current_timestamp, current_timestamp); + #end Commission/Promotion/Product Channel -# Menu Channel +# Menu Channel # From Store to SX insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('accounts','store_2_sx', 100, current_timestamp, current_timestamp); @@ -423,9 +509,49 @@ insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('menu_instance_item_sets','store_2_sx', 100, current_timestamp, current_timestamp); +# Menu Channel # From SX to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('accounts','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_item_attributes','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_item_options','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menus','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_categories','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_items','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_item_instances','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('item_sets','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_item_sets','sx_2_store', 100, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('menu_instance_item_sets','sx_2_store', 100, current_timestamp, current_timestamp); #End Menu Channel -# Order Channel +# Order Channel # From Store to Sx insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('orders','store_2_sx', 200, current_timestamp, current_timestamp); @@ -441,9 +567,26 @@ values('bookings','store_2_sx', 200, current_timestamp, current_timestamp); insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('booking_orders','store_2_sx', 200, current_timestamp, current_timestamp); + +# Order Channel # From SX to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('orders','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('order_items','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('bookings','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('booking_orders','sx_2_store', 200, current_timestamp, current_timestamp); # End Order Channel -# Sale Channel +# Sale Channel # From Store to Sx insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('sales','store_2_sx', 200, current_timestamp, current_timestamp); @@ -475,9 +618,42 @@ values('payment_journals','store_2_sx', 200, current_timestamp, current_timestam insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('shift_sales','store_2_sx', 200, current_timestamp, current_timestamp); + +# Sale Channel # From SX to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('sales','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('sale_items','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('sale_audits','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('sale_orders','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('sale_payments','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('sale_taxes','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('payment_journals','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('shift_sales','sx_2_store', 200, current_timestamp, current_timestamp); # End Sale Channel -# Oqs Channel +# Oqs Channel # From Store to Sx insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('assigned_order_items','store_2_sx', 200, current_timestamp, current_timestamp); @@ -497,6 +673,27 @@ values('order_queue_process_by_zones','store_2_sx', 200, current_timestamp, curr insert into sym_trigger_router (trigger_id,router_id,initial_load_order,last_update_time,create_time) values('order_queue_stations','store_2_sx', 200, current_timestamp, current_timestamp); + +# Oqs Channel # From SX to Store +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('assigned_order_items','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('cashier_terminals','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('cashier_login_logs','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('order_queue_process_by_zones','sx_2_store', 200, current_timestamp, current_timestamp); + +insert into sym_trigger_router +(trigger_id,router_id,initial_load_order,last_update_time,create_time) +values('order_queue_stations','sx_2_store', 200, current_timestamp, current_timestamp); # End Oqs Channel