Database migration framework for .NET and .NET Core.
Curiosity.Migrations is a migration framework that uses SQL scripts and code migration to alter your database schema or seed a data.
Without migrations you need to create a lots of sql scripts that have to be run manually by every developer involved. Migrations solve the problem of evolving a database schema for multiple databases (for example, the developer's local database, the test database and the production database).
Curiosity.Migration has a lot of useful features. You can find more information about them at special articles:
- Script migrations: write your own DDL SQL scripts
- Batches: separate a big SQL script into small batches
- Code migrations: manipulate data from C#, useful for database seeding
- Dependency Injection: inject dependencies into code migrations
- EntityFramework Integration: use
EntityFrameworkfor data manipulation from code migrations
- Migration Providers: store migrations in a different way (files, embedded resources, etc)
- Variable substitutions: allows to insert some dynamic data to your migrations
- Transactions: you can enable or disable transaction for separate migration
- Pre-migrations: executes SQL or code before main migration
- Journal: choose your own table to store migration history
- Downgrade migrations: allows you to reverse applied migrations
If you don't find a desired database, you can contribute and add support by yourself.
Curiosity.Migrations is available as a Nuget package.
You can find documentation and samples at ReadTheDocs.