DB2 Code First Migrations

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for DB2
Post Reply
Posts: 6
Joined: Wed 12 Feb 2014 00:43
Location: Melbourne, Australia

DB2 Code First Migrations

Post by david.tuke » Thu 13 Mar 2014 23:12


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


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


Site Admin
Posts: 8892
Joined: Thu 14 Aug 2008 12:44

Re: DB2 Code First Migrations

Post by Shalex » Wed 19 Mar 2014 12:28

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

Post Reply