title: What is the best way to create a PHP/MySQL upgrade script for a software developer?
body: <p>I am a PHP software developer and am looking for the best solution to get around this concern I have.  I am create a script that will in the future have new releases that includes new features, bugfixes, etc.  I know how to do the code changes in the upgrade script, however I the script I am developing uses MySQL to store data in multiple tables.</p>
  <p><strong>Now here is the question, I have figured out how to make an install script for the initial release, however what is the best solution/method to making an upgrade script that can upgrade any previous version up to the latest version?  The latest version has new MySQL tables (not a problem), however it also changes the database structure (new columns, delete columns, etc.)  I will create a scenario below to better picture what I am worried about.</strong></p>
  <blockquote>
  <p>v0.1.0 - Initial Release</p>
  <p>v0.1.1 - Has a new database table and some fields added to the table structure</p>
  <p>v0.2.0 - Has more new fields added to different tables</p>
  <p>My concern is the the upgrade v0.1.0 &gt; v0.2.0 because there were changes between the two versions.</p>
  </blockquote>
  <p><strong>UPDATE</strong> I probably could have mentioned that I am using GitHub as my VCS for the code alone.  All code changes are saved there and in the install or upgrade script for code changes, I just plan on overwriting the user's current files as they shouldn't have any data within class/function files.</p>