Set up the database schema file
The DB Sync system needs application SQL tables description to be provided in the database schema file.
If it does not exist, the tasks described in this section will create the DB Sync schema file in the "conf" sub-directory of the DB Sync deployment directory of the GAS. Before un-deploying the DB Sync system and removing the deployed files from the GAS, you may want to keep a copy of the schema file.
In the context of GAS upgrade, you might just want to copy the files form the previous GAS installation.
- Open the
dbsync.html
starter page in a browser:
For example:http[s]://host:port/ua/web/dbsync_setup_server_config/dbsync.html
http://toro:6394/ua/web/dbsync_setup_server_config/dbsync.html
-
Select the Database schema editor application.
-
Connect as
dbsync_admin
user. -
The schema tool will detect unexisting schema file and ask to extract it.
-
Edit the schema by defining the type of synchronization you want for each table, auto-incremented columns, the type of foreign key relation between tables.
For more details about database schema definitions, see Database schema reference.
-
Verify the schema file with the Check option.
-
Save changes. The schema file location is defined by the schema parameter in the global DB Sync configuration file dbsync_config.json.
-
Note that the DB Sync schema can be extracted with the
dbsync schema
tool:
The schema editor can be started with:dbsync_schema extract extract-options
dbsync_schema edit -c dbsync_config.json