I'm using Subversion to look after the source code for a website of mine (or I will be, but I'm stuck).
How on earth do I look after the MySQL database schema / structure in Subversion?
I'm using PHP but not with a framework.
I need to of course keep production data intact when deploying to the production server, just altering the structure as needs be. However there will be test data for the testing server and local development.
I've searched and searched but every solution I've found pretty much blows my mind with confusion. I've tried using versioning in the past but this is what always stops me, it's not a *huge* issue as I'm a sole developer but it would be nice to use Subversion for the various benefits even to a sole developer. In addition to this I'd like to learn how to use Subversion effectively now incase I'm ever looking for employment (for myself) in the future where version control would be the norm.
I kinda wish that RoR was my language & framework right now since everybody says that RoR handles database migration data itself =(
One method I've used in the past, is to create scripts for any db changes - new fields, new tables, field changes, indexes, everything.
Then those scripts become part of the deployment. Then whatever date point your data is at, you always know which set of scripts you need to run to match the code you want to use. (Does that makes sense?)
It's tempting to just use phpMyAdmin but scripting it keeps things consistent, trackable and versionable - new word ;-)