Skip to content

Commit

Permalink
couple tweaks to getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 29, 2007
1 parent 8e49d15 commit cd6e931
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 7 deletions.
10 changes: 7 additions & 3 deletions symmetric/src/main/deploy/samples/client.properties
Expand Up @@ -2,13 +2,17 @@
db.driver=com.mysql.jdbc.Driver

# The JDBC URL used to connect to the database
db.url=jdbc:mysql://localhost/symmetric
db.url=jdbc:mysql://localhost/sampleclient

# The user to login as who can create and update tables
db.user=symmetric

# The password for the user to login as
db.password=

# The HTTP URL of the root node to contact for registration (http://hostname:8080/sync)
symmetric.runtime.registration.url=
# The HTTP URL of the root node to contact for registration
symmetric.runtime.registration.url=http://localhost:8080/sync

# Do not change these for running the demo
symmetric.runtime.group.id=store
symmetric.runtime.external.id=1
51 changes: 48 additions & 3 deletions symmetric/src/main/deploy/samples/insert_sample.sql
@@ -1,6 +1,6 @@
--
------------------------------------------------------------------------------
-- Sample Data
--
------------------------------------------------------------------------------
insert into item_selling_price (price_id, price, cost) values (1, 0.10, 0.09);
insert into item (item_id, price_id, name) values (11000001, 1, 'Yummy Gum');

Expand All @@ -9,7 +9,52 @@ values (900, '1', '3', '2007-11-01', 90);
insert into sale_return_line_item (tran_id, item_id, price, quantity)
values (900, 11000001, 0.10, 1);

------------------------------------------------------------------------------
-- Sample Symmetric Configuration
------------------------------------------------------------------------------
--
-- Nodes
--
insert into sym_node_group (node_group_id, description)
values ('corp', 'Central Office');
insert into sym_node_group (node_group_id, description)
values ('store', 'Store');

insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action)
values ('store', 'corp', 'P');
insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action)
values ('corp', 'store', 'W');

insert into sym_node (node_id, node_group_id, external_id, sync_enabled)
values ('00000', 'corp', '00000', '1');
insert into sym_node_identity values ('00000');

--
-- Sample SymmetricDS Configuration
-- Channels
--
insert into sym_channel
(channel_id, processing_order, max_batch_size, enabled, description)
values('transaction', 1, 100000, 1, 'Transactional data from register and back office');

insert into sym_channel
(channel_id, processing_order, max_batch_size, enabled, description)
values('item', 1, 100000, 1, 'Item and pricing data');

--
-- Triggers
--
insert into sym_trigger
(trigger_id, source_table_name, source_node_group_id, target_node_group_id, channel_id, sync_on_insert, sync_on_update, sync_on_delete, initial_load_order, last_updated_by, last_updated_time, create_time)
values(1, 'item_selling_price', 'corp', 'store', 'item', 1, 1, 1, 100, 'demo', current_timestamp, current_timestamp);

insert into sym_trigger
(trigger_id, source_table_name, source_node_group_id, target_node_group_id, channel_id, sync_on_insert, sync_on_update, sync_on_delete, initial_load_order, last_updated_by, last_updated_time, create_time)
values(2, 'item', 'corp', 'store', 'item', 1, 1, 1, 105, 'demo', current_timestamp, current_timestamp);

insert into sym_trigger
(trigger_id, source_table_name, source_node_group_id, target_node_group_id, channel_id, sync_on_insert, sync_on_update, sync_on_delete, initial_load_order, last_updated_by, last_updated_time, create_time)
values(3, 'transaction', 'store', 'corp', 'transaction', 1, 1, 1, 200, 'demo', current_timestamp, current_timestamp);

insert into sym_trigger
(trigger_id, source_table_name, source_node_group_id, target_node_group_id, channel_id, sync_on_insert, sync_on_update, sync_on_delete, initial_load_order, last_updated_by, last_updated_time, create_time)
values(4, 'sale_return_line_item', 'store', 'corp', 'transaction', 1, 1, 1, 205, 'demo', current_timestamp, current_timestamp);
6 changes: 5 additions & 1 deletion symmetric/src/main/deploy/samples/root.properties
Expand Up @@ -2,10 +2,14 @@
db.driver=com.mysql.jdbc.Driver

# The JDBC URL used to connect to the database
db.url=jdbc:mysql://localhost/symmetric
db.url=jdbc:mysql://localhost/sampleroot

# The user to login as who can create and update tables
db.user=symmetric

# The password for the user to login as
db.password=

# Do not change these for running the demo
symmetric.runtime.group.id=corp
symmetric.runtime.external.id=0000

0 comments on commit cd6e931

Please sign in to comment.