I'm in the process of automating Omeka upgrades via a script. I can easily do all the file/folder moving and merging but right now the user has to go into admin to initiate the database upgrade (and of course the site is offline until they do). I'd like to try and script the schema migrations as well. Here's what I've managed to dig around and figure out so far:
The function migrate() within the class Omeka_Db_Migration_Manager handles all the schema migrations. In my script I have database information generalized for the install that is being upgraded. I haven't been able to figure out a way to fire off migrate() from the command line because it gets tripped up constructing an Omeka_Db instance (line 52 in application/libraries/Omeka/Db/Migration/Manager.php).
Any ideas how I would tackle this or has anyone successfully generalized and automated that final step of upgrading the database?