This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
development:database_migration_management [2015/04/23 20:37] lee [Background] |
development:database_migration_management [2015/04/24 13:07] lee [The basics of how Flyway works] |
||
---|---|---|---|
Line 8: | Line 8: | ||
The OHDSI WebAPI executable has a dependency on a java framework called "Flyway" to manage the execution of the database schema migration scripts that perform the database migrations. | The OHDSI WebAPI executable has a dependency on a java framework called "Flyway" to manage the execution of the database schema migration scripts that perform the database migrations. | ||
- | The advantages with this approach are: | + | The advantages of this approach are: |
* It provides a timestamped, checksum verified audit trail of all applied database schema changes | * It provides a timestamped, checksum verified audit trail of all applied database schema changes | ||
Line 15: | Line 15: | ||
==== The basics of how Flyway works ==== | ==== The basics of how Flyway works ==== | ||
- | The Flyway data migration framework will execute database migration scripts that are provided in a known directory (or sub-directory) in the source code tree and each script name must begin with a database migration version number. Each script is a SQL source code file containing Database Definition Language (DDL) statements. | + | The Flyway data migration framework will execute database migration scripts that are provided in a known directory (or sub-directory) in the source code tree and each script name must begin with a database migration version number. Each script is a SQL source code file containing only the set of Database Definition Language (DDL) changes that need to be applied to the existing database schema in order to migrate it to the latest version. |
The scripts are executed in the order of the database migration version number in the script names. | The scripts are executed in the order of the database migration version number in the script names. |