I'm sure you can fix most problems with some text or GUI compare tool . However, every time the format is changed or someone is not following your standard, everything will seem to have changed. Somewhere down the line you will find yourself fixing strange errors such as counting whitespaces etc.
What I am getting at, is that in my experience this is not entirely the best way to do this. Over the years I've seen a few different attempts on how to solve this updating problem.
- Visual Studio has one angle on this by creating a database project which keeps all changes in some sort of version log. not entirely sure on the specifics. Simply put you press Sync and tada! It works but is very comprehensive and slow if you ask me.
The easiest method to handle this IMO, is to make all structural changes into a version log/table; so to speak.
Lets say your basic database needs a new Table. You would go into your editor and add it (using GUI or code), press save and you are done.
Instead press Extract SQL; don't press save.
What I propose now, is this:
You build a little internal web interface with a big input box and a submit button. Hitting the submit button will execute any SQL from the input box against your Local development database and return to you the result.
If the DB returns success, the SQL string is added to your changeLogSQLVersionThingyTable with at least three columns:
1) Auto incremented version (Integer)
2) The sql (text)
3) Timestamp (timedate)
4) Developer Id ??
When you have changes to your DB, such as adding the table from before, use this tool instead.
You now have all your changes to your Database in a nice version list. To update a database all you have to do is execute every row in the changeLogSQLVersionThingyTable from what ever version that particular database was updated into last time.
With some effort you can also rebuild your database to a earlier point; just create a new db and run all rows all the way up to your desired version point.