Question

I'm currently facing a problem when scripting my development db with SQL Server Management Studio.

I'm developing an application using EF5 code first and I'm constantly moving my development db from one machine to the other. The method I'm using to move my db is having SQL Server Management Studio to script the db (Tasks -> Generate scripts) so I can copy the generated script and then execute it on the other machine.

Well, it happens that EF code first creates a table call _MigrationHistory as a system table and SQL Server Management Studio is not scripting that table.

Am I using the wrong method for generating a "portable copy" of my database?

What should I do to have SQL Server Management Studio include that table in the generated script?

Thanks in advance

Juan Carlos

Was it helpful?

Solution

I finally used this method:

I detached the database then copy the .mdb and the .ldb to a save location and then re-attached the database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top