relation "__MigrationHistory" already exists error when attempting to use EF Code First with PostgreSQL
Posted: Fri 07 Sep 2012 21:39
This problem happens even when using the CrmDemo located here: http://blogs.devart.com/dotconnect/enti ... irstsample
When running with EF 4.1 everything seems to work fine. When using EF 4.4 or 5.0 (upgraded using NuGet, I have to fix the references and using statements so the demo compiles) I get the given error after I run the program once: relation "__MigrationHistory" already exists.
The first time I run when the DB is empty everything appears to work fine and the __MigrationHistory table is created. After that I get the error every time. Other than upgrading Entity Framework and adding the necessary using directive, I have made no changes. I get the same problems in the my test projects.
I am using VS 2010 and PostgreSQL 9.1.5.
Any recommendations to fix this issue?
When running with EF 4.1 everything seems to work fine. When using EF 4.4 or 5.0 (upgraded using NuGet, I have to fix the references and using statements so the demo compiles) I get the given error after I run the program once: relation "__MigrationHistory" already exists.
The first time I run when the DB is empty everything appears to work fine and the __MigrationHistory table is created. After that I get the error every time. Other than upgrading Entity Framework and adding the necessary using directive, I have made no changes. I get the same problems in the my test projects.
I am using VS 2010 and PostgreSQL 9.1.5.
Any recommendations to fix this issue?