I have a long migration script to execute, beginning from the initial migration, that was generated by VS/package-manager using update-database -script
. It doesn't seem to automatically separate the script into batches so that I can easily execute it in sql management studio. Is there a way to do this, or are we expected to insert dozens of go
manaully?
Asked
Active
Viewed 253 times
1

Lee
- 3,869
- 12
- 45
- 65
-
If you are doing this because of the "should be the first statement in a batch file" error, then you can get around it by using `EXEC` http://stackoverflow.com/a/25164640/150342 – Colin Mar 23 '15 at 12:02
-
I tried that method but seeing as the script is so long I'd have to go around escpaing the single quotes, it would be as laborious as inserting `go` after each batch. – Lee Mar 23 '15 at 13:33
-
http://stackoverflow.com/questions/29919216/dbmigration-sql-method-can-i-use-the-suppresstransaction-parameter-safely – Colin Apr 28 '15 at 12:16