title: What are the best practices for database scripts under code control
body: <p>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?</p>
  
  <p>Some of the factors we'd need to consider include:</p>
  
  <ul>
  <li>Should we checkin 'Create' scripts or checkin incremental changes with 'Alter' scripts</li>
  <li>How do we keep track of the state of the database for a given release</li>
  <li>It should be easy to build a database from scratch for any given release version</li>
  <li>Should a table exist in the database listing the scripts that have run against it, or the version of the database etc.</li>
  </ul>
  
  <p>Obviously it's a pretty open ended question, so I'm keen to hear what people's experience has taught them.</p>