문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top