I am thinking of using Entity Framework 6 Code First for database interaction alongside DbUp for database schema update. The thing is I don't want to use EF migration for reasons. So, the workflow that I've reached to is:
- Change model (add
POCOs, alter properties, etc) - Run
Add-Migration temp_fileinVisual Studio Package Manager Console - Run
Update-Database -ScriptinVisual Studio Package Manager Console - Grab the generated
sqlscripts including insertion of new row in table__MigrationHistory - Create a new
.sqlfile and past the generated scripts - Delete
temp_file - Run DbUp
It works perfectly locally and on production server, however I don't feel comfortable with adding and then deleting temp_file every time a new migration is generated (I wish there were a way to permanently stop temp_file being added to the solution.).
So question:
Is there a better way to do database migration with DbUp using Entity Framework?