Losing Migration Log
sasankj
Posts: 23 New member
My understanding is that MIgrationId of MigrationLog table is key which drives the entire release cycle of a script across environments. Since MigrationLog is created under a DBO schema and since most of the developers will have dbo permissions on development DB, what if a developer accidentally drops Migrationlog table on development DB? How do you recommend handling this situation? How can we prevent this from happening in first place?
Tagged:
Best Answer
-
way0utwest Posts: 312 Rose Gold 1You can remove permissions for drops on this table. This is a tracking table, the same structure that other frameworks would use. If it's removed, that's an issue.You can certainly pull a previous version of this from a backup, which is what you'd want to do in production. However, part of the value of SCA is that you can rebuild your database. We do this as part of the build, so you can just drop the database and have SCA rebuild it from scratch.
One note here, you want to be sure that you have a curated set of data to reload if you need to reload a database. I'd recommend this anyway, ensuring that all developers have the same starting set of data.Editor, SQLServerCentral