User Tools

Site Tools


development:database_migration_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
development:database_migration_management [2015/04/23 20:30]
lee [How the OHDSI WebAPI services use Flyway]
development:database_migration_management [2015/04/24 13:08]
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 of this approach are:
 +
 +  * It provides a timestamped,​ checksum verified audit trail of all applied database schema changes
 +  * All database schema changes are performed via SQL DDL scripts that are version controlled
 +  * Initial creation of tables and all subsequent database migrations are automatically executed dynamically in new and existing databases
 ==== 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 database migration ​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.
development/database_migration_management.txt · Last modified: 2015/04/24 13:18 by lee