We are currently reviewing how we store our database scripts (tables, procs, functions, views, data fixes) in subversion and I was wondering if there is any consensus as to what is the best approach?
Some of the factors we'd need to consider include:
- Should we checkin 'Create' scripts or checkin incremental changes with 'Alter' scripts
- How do we keep track of the state of the database for a given release
- It should be easy to build a database from scratch for any given release version
- Should a table exist in the database listing the scripts that have run against it, or the version of the database etc.
Obviously it's a pretty open ended question, so I'm keen to hear what people's experience has taught them.