How do you version your database schemas?
There are quite a lot of different options. On some very small /
trivial applications developed by just one person, it might be
acceptable to use ad-hoc queries (maybe with a GUI) to manage the
schema - but this runs the risk of development and production
schemas becoming out of sync (or rather, out of sync with their
respective versions of code).
Requirements are typically
- Schema changes are held with the rest of the software in a
SCM system
- Schema changes can be made in one development environment and will be correctly propogated with code to other development and production environments as required
- Schema changes can be rolled back (if for example, a deployment contains a serious bug)
There doesn't seem to be an easy answer for this one.
Our teams do something like:
- …