Interesting
Many years ago I wrote some code which automated minor schema changes in MySQL for websites. It's still in use and handles:
* creating tables and their indexes in newly set up databases - all tables are automatically created the first time the website is accessed
* adding new fields added to a table (in most cases it can add new fields to a primary key);
* deleting non-critical (e.g. non-primary key) fields;
* adding or removing indexes;
* renaming fields provided no more than one field of a particular type and length is changed simultaneously. If it discovers, say, two VARCHAR(100) fields being renamed simultaneously it reports that it has no idea which one needs renaming to what new name and gracefully exits;
* non-destructive field type changes - i.e. nothing that should lose data. E.g. changing VARCHAR(40) to VARCHAR(100), TEXT to LONGTEXT, INT to BIGINT.
The code that does this compares the schema derived from the code view of it against the MySQL view of it (from the DESCRIBE statement) and runs the appropriate update depending on the changes detected. The code is either executed once a day or if an SQL statement fails. So, adding a new field to a table (via the code) and having that field requested will silently fail the first time it is used, which causes it to then call the code that updates the schema. Then it tries the SQL statement a second time (a second fail will stop the program). So, the whole process is transparent to the user who just sees a new field added and the system appears to carry on without a hiccup.
The whole thing removes about 99% of the need for manual hacking around with the database so has probably saved me hours of time.