Save your schema in your repo then if you need to roll back. Then write a cap or shell script to:
1. Obtain the revision you want to roll back to (Given as an argument).
2. Backup current DB to a time stamped file.
3. Branch current repo to a time stamped branch
4. Roll back SVN given the revision
5. Drop tables in current DB
6. Restore schema given the revision.
Note: Please make sure steps 2 and 3 are working before executing steps 4, 5, 6.
Note: Please understand that depending the size of your schema and repo will measure the time it takes for this to complete.
Note: It is important to not run this script on a live production environment. Use best practices.
Note: I am not responsible for destroying your life.
On Wed, Sep 16, 2009 at 4:14 PM, Alan Puccinelli
<[address removed]> wrote:
Has anyone come across a good method for keeping their source code and database schema in sychronized version control so that you can roll back code and schema simultaneously if need be?
In particular I would be super stoked if there were something out there like springloops (www.springloops.com- web based SVN manager) with a web GUI that keeps your DBs in sync and allows you to easily deploy from dev to production.
Is this just wishful thinking or has anyone seen it?
-Alan
--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Alan Puccinelli ([address removed]) from The San Francisco PHP Meetup Group.
To learn more about Alan Puccinelli, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here
Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA