From 394770fded0e9b01d47f89231be4a0300294f56c Mon Sep 17 00:00:00 2001 From: Low Jia Jin Date: Sat, 4 Jul 2020 13:34:47 +0800 Subject: [PATCH] Update README.md Forgot to point the DatabaseSyncer back to the schema group --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54efab6..17eca64 100644 --- a/README.md +++ b/README.md @@ -87,18 +87,23 @@ When we have multiple `Snowfall` instances generating concurrently across multip > :warning: **Permissions required**: The `DatabaseSyncer` creates new tables `snowfall_{schema_group_name}_properties` and `snowfall_{schema_group_name}_manifest`, and performs CRUD operations on them. +First, create the schema group. Because this operation creates the relevant tables in the database of your choice, it should only be done once. You can also access this function via the terminal as `create_db_schema_group`. ``` -from datetime import datetime -from snowfall import Snowfall from snowfall.generator_syncers import DatabaseSyncer DatabaseSyncer.create_schema_group( schema_group_name="example_schema_group", engine_url="dbms://user:pass@host:port/db" ) +``` + +Next, just start a `Snowfall` anywhere you want, and point it to the schema group you created. +``` +from snowfall import Snowfall id_generator = Snowfall(= generator_syncer_type=DatabaseSyncer, + schema_group_name="example_schema_group", engine_url="dbms://user:pass@host:port/db" ) ```