Database Migrations

Migrations are a solution to the problem of managing database versions. A migration captures the set of actions required to update a database from one version to the next—which might include schema changes such as widening or adding columns and/or data changes such as computing defaults for new columns—and to roll that same database back to its original state.

Capturing migrations as artifacts makes it easier and more reliable to apply the changes to multiple physical databases (development, test, staging and production) with high confidence that the same set of changes is being applied each time—because it worked in staging, it will work in production.

Being able to roll migrations backwards as well as forwards is important for acceptance testing and staging environments. For example, if staging fails, you will want to revert it to its previous status. But you may not want to rebuild the entire environment from scratch. Running migrations in reverse enables this.

LightSpeed’s migrations framework provides you with:

·         A way to specify migrations in code using a database-agnostic API and the full flexibility of the .NET Framework.

·         A tool that creates migrations for you as you make changes to your LightSpeed model.

·         Command-line and GUI tools for running migrations, or for generating SQL scripts that can be run later by a DBA.

Creating Migrations

Running Migrations

Creating SQL Scripts from Migrations

Database Support