Manually edit the auto-generated object scripts without causing commit issues?
Uji2
Posts: 5 New member
I'm working with a test database and using a working folder as the repo. After I performed the first commit, I went into the folder and re-formatted the auto-generated table scripts. I then updated the table definition in ssms. Source Control picked up the table definition change, but throws an error on Commit because it thinks the change is out of date.
Even though I did not make any functional changes by manually editing the script (just pretty-printing) Source Control still doesn't like it. So is there any way to be able to manually edit the generated scripts and not throw Source Control out of whack? Or even better, push the changes in reverse - from script to db?
Even though I did not make any functional changes by manually editing the script (just pretty-printing) Source Control still doesn't like it. So is there any way to be able to manually edit the generated scripts and not throw Source Control out of whack? Or even better, push the changes in reverse - from script to db?
Tagged:
Best Answers
-
Uji2 Posts: 5 New memberYeah it will work, but it's a bummer that the scripts themselves can't really be edited. It would be a really cool feature to be able to edit the scripts and have the ability in the commit dialogue to sync the db code with the script. So in the Commit screen where it has the Database Version -> Latest Source Control Version, it would be nice if you could reverse that arrow and push your changes the other way.
-
David Atkinson Posts: 1,462 Rose Gold 2Well.. I think you can do this, but just not for tables. You'll need to edit the comparison options in the Setup tab to uncheck "ignore white space" so that formatting changes are registered as differences. You can get do a get latest against your database to apply the formatting changes. If in the meantime you've changed the procedure you will be presented with a conflict, and you can solve this in the normal way by choosing one version or the other.David Atkinson
Product Manager
Redgate Software
Answers
Product Manager
Redgate Software
Product Manager
Redgate Software
Product Manager
Redgate Software