DB2 Code First Migrations

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

DB2 Code First Migrations

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

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

Shalex
Site Admin
Posts: 9543
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
http://www.devart.com/dbmonitor/dbmon3.exe

Post Reply