Comments
2 comments
-
Hi,
We don't recommend removing them since if you need to deploy to a blank DB you should have all of them.
If you want to delete them, then you would have to start from the most recent script.
You can the recreate scripts for past revisions using the technique outlined in the following document:
http://documentation.red-gate.com/display/SOC5/Historical+migration+scripts
Thank you, -
Is this still considered a valid answer? I have a migration script from last year that references a field that no longer exists. When I go to apply to an empty database (or a full one from a database restore, say from production) I can't because the old migration script will always fail. To fix it, I had to check out the repository to a normal folder, delete the offending script and alter the json file that determines the patch order so that entry is no longer there. I committed then went back to SSMS, refreshed on the "Get Latest" tab and found the script wasn't there anymore. After that, the update worked.
Add comment
Please sign in to leave a comment.
So my question is what do most of you do to archive these? do you just delete the old ones out manually? when i go to SQL source Control and look at old scripts there is no option for delete on old ones just view\edit. What have you found is the best practice for getting rid of the old ones?