Page 1 of 1

DB2 Code First Migrations

Posted: Thu 13 Mar 2014 23:12
by david.tuke
Hi

How do I stop DB2/Devart creating the following table in my DB2 V10.5 database:

__MigrationHistory

Difficult to delete this (need special tools)
How can I disable Migrations/Initialisation altogether

Thx

Re: DB2 Code First Migrations

Posted: Wed 19 Mar 2014 12:28
by Shalex
Please try the following:
1) disable automatic migrations (AutomaticMigrationsEnabled = false;)
2) run DbContext.Database.Create()/ObjectContext.CreateDatabase() explicitly: http://stackoverflow.com/questions/1125 ... 5#11259675

If this doesn't help, find out which exactly code in your application creates / talks to __MigrationHistory. For this employ the dbMonitor tool:
http://www.devart.com/dotconnect/db2/do ... nitor.html
http://www.devart.com/dbmonitor/dbmon3.exe