
Last Update: 2008-10-10
DB Scripts |
Modules |
Projects |
Synchronization |
Users |
Help |
A strong version control system for databases saves time to developers, who would like to keep their schema updated while developing with minimal effort. With a version control for databases, the number of mistakes dued to different schemas or missing scripts is considerably reduced. Critical errors in production due to schema inconsistencies disappear, too.
deltasql is an Open Source tool to synchronize databases with source code. While developing middle size or big applications, developers undertake changes to the data model which go along with changes to the source code. From time to time, branches of source code are done to stabilize the code which will go to production. A sort of data model branch is also needed.
deltasql provides a simple set of php scripts to be executed on an apache server backed by a mySQL database to collect all scripts which change the data model, and means to handle data model branches. The trick is to number the sql scripts and to create on each database instance a table which keeps the number of the latest executed script (the table deltasql uses is named TBSYNCHRONIZE).
A form allows the user to enter data from the synchronization table and thereafter the needed chain of datamodel updates is computed and shown to the user. The user has to manually execute all scripts. It is possible to update development schemas (the HEADs) and production schemas (the branches), to transform a production schema into a development schema and vice versa. However, it is not possible to downgrade a schema back to a previous version.
There are deltasql clients (listed in the table at the bottom), which automatically collect synchronization data from a given database schema. Though deltasql works best with Oracle, PostgreSQL and mySQL schemas, any other database type can use most of deltasql functionality.
Instead of manually synchronizing with the form in the synchronization section on the server, you might want to try out one of the clients that connect to this server and which integrate into your development environment:
| client | environment | supported databases | version | actions |
|---|---|---|---|---|
| ant-client | Eclipse (Ant) | MySQL, PostgreSQL, Oracle, MS SQL Server, Sybase | 1.001 | download... |
| dbredactor | Eclipse (Java, Ant) | MySQL, PostgreSQL, Oracle, MS SQL Server, Sybase | 1.001 | download... |