Questions tagged [migratordotnet]

Database migrations for .NET. Based on the idea of Rails ActiveRecord Migrations.

Database migrations for .NET. Based on the idea of Rails ActiveRecord Migrations.

Supported Databases

  • MySQL
  • Oracle (not well tested?)
  • PostgreSQL
  • SQLite
  • SQL Server

Writing Migrations

Some Example Migrations

32 questions
19
votes
6 answers

How do I test database migrations?

I'm using Migrator.NET to write database migrations for the application. Marc-André Cournoyer wrote: Like any code in your application you must test your migrations. Ups and downs code. Do it part of your continuous build process and test it …
Pawel Krakowiak
  • 9,940
  • 3
  • 37
  • 55
16
votes
4 answers

Do Fluent NHibernate and migratordotnet play nicely together?

I love Fluent NHibernate for building my DBs and so far haven't found a restriction that has halted me in my tracks. However on my current project I expect to release to production very early in the product lifecycle and hence expect there to be…
10
votes
4 answers

.NET migrations: Setup and migrate multiple databases at runtime

Brief introduction: I have this ASP.NET Webforms site with the particularity that it doesn't have only 1 database, it has many. Why? Because you can create new "instances" of the site on-the-fly. Every "instance" share the same codebase, but has its…
empz
  • 11,509
  • 16
  • 65
  • 106
3
votes
2 answers

Migratordotnet : How to check if a migration is pending?

I want stop my Build process through MSBuild, if there is pending migrations. But I don't want to trigger the Migrate target while building my project. So, How can I check only pending migrations with Migratordotnet ? I just want to use it as a…
Yugal Jindle
  • 44,057
  • 43
  • 129
  • 197
3
votes
1 answer

MitratorDotNet (Migrator.Net) - Can I use with just bare SQL up/down migration files?

Could I use migrator.net bare migration framework and just have a set of SQL files to do the upgrade/downgrade? i.e. just use the framework to check database version and which scripts to run etc? thanks
Greg
  • 34,042
  • 79
  • 253
  • 454
3
votes
3 answers

database migration code generator

I want to introduce database migrations into my project and would like to be able to generate my initial migration scripts from the database. I was wondering if there are any code generation tools around to do this? I was thinking of using…
Charlie
  • 10,227
  • 10
  • 51
  • 92
3
votes
5 answers

Two different assembly versions "The located assembly's manifest definition does not match the assembly reference"

I have a project that I am working on that requires the use of the Mysql Connector for NHibernate, (Mysql.Data.dll). I also want to reference another project (Migrator.NET) in the same project. The problem is even though Migrator.NET is built with…
snicker
  • 6,080
  • 6
  • 43
  • 49
3
votes
1 answer

Adding Migrator.NET to an existing production database

I am interested in starting to use Migrator.NET with an existing production database. I have a some initial states that I need to support: a) Database is at current release (release where we started using Migrator), no upgrade necessary. …
Ron
  • 978
  • 3
  • 13
  • 27
2
votes
1 answer

Generate initial database migration script from existing schema

I have a huge pre-existing database that I'd like to bring under version control using Migrator.NET for migration scripts and I don't like keeping the MDF file around just for the existing schema. How can I generate an initial migration script…
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
2
votes
1 answer

Migratordotnet creating initial migration

I'm trying to use migratordotnet for existing database. My database has around 100 tables and I'm trying to generate initial migration. I've tried using C:\migrations>Migrator.Console.exe SqlServer "Data Source=.\sqlexpress;Initial…
Emir
  • 1,586
  • 3
  • 16
  • 32
2
votes
1 answer

DB2 REORG TABLE from client side with Migrator.NET

I'm using Migrator.NET with a DB2 database and my current migration executes an ALTER TABLE statement, which causes the table to go into the "reorg pending state". This state requires the reorganisation of the table with > REORG TABLE TableName…
Matthias Schippling
  • 2,923
  • 1
  • 18
  • 29
2
votes
1 answer

FluentMigrator - how to alter table permissions?

I have started using FluentMigrator as my database migration tool for my MSSQL databases. It seems to cater for most of my needs in regards to CRUD table operations and seeding. However i simply cannot find a way to configure table permissions after…
1
vote
1 answer

How do you tell if your migrations are up to date with migratordotnet?

I'm using migratordotnet to manage my database migrations. I'm running them on application setup like this, but I would also like to check on application startup that the migrations are up to date, and provide the option to migrate to latest. How…
Lance Fisher
  • 25,684
  • 22
  • 96
  • 122
1
vote
0 answers

Mature migratordotnet alternative

I'm looking for a database migration framework (supporting most used database engine) for c# like migratordotnet that I'm actually use. Is this the only "mature" choice? update I've found also: FluentMigrator
danyolgiax
  • 12,798
  • 10
  • 65
  • 116
1
vote
2 answers

How do I add new column with default value in Migrator.Framework in C#?

I am using code similar to the following: Database.AddColumn( "TableName", new Column( "ColumnName", DbType.String, ColumnProperty.NotNull, …
Avinash
  • 173
  • 1
  • 4
  • 17
1
2 3