Note: JDK version must be version 1.5 or higher
1. Download Dbdeploy-dist-3.0m3-distribution.zip file
2. Unzip and change the file, anywhere
3. Open the command panel and switch directories to example
4. Make sure you have ant installed and the environment variable is configured.
5. Execute Ant command
6, you will see the following output information
For example, for simplicity, use a hsqldb that includes the version that is assigned to the local file. Dbdeploy supports other databases including oracle,mysql and Microsoft SQL Server.
Deleting and creating a new directory makes the example start with a clean library every time.
The above indicates that a new directory has been created
Dbdeploy uses a table in the database called "Changelog" to keep track of which scripts have been executed successfully.
The above shows that: Dbdeploy executed the CreateSchemaVersionTable.hsql.sql file, and there were 2/2 successful executions.
The next step is to scan the script directory
Current script applied to modify database (none)
Valid scripts are 1, 2, 3
Execute Scripts 1, 2, 3
The final execution was completed successfully.
When executed again: Ant Update-database
As follows:
Discover current script applied to modify database (1, 2, 3)
Valid scripts are 1, 2, 3
Execute script (None)
Database version management tool Dbdeploy (ANT+HSQLDB article)