Migrations are PHP Class files in the /migration/ sub folder of an app or library. They can be run via the horde-db-migrate script or the web UI.
They allow schema and data conversions forward and back.
Schema files prepend the lowercased class name with a version:
The first version's file would be 1_$app_foo (usually 1_$app_base_tables) which would contain the class named $AppFoo ($AppBaseTables) derived from Horde_Db_Migration_Base. See https://github.com/horde/skeleton/blob/master/migration/1_skeleton_base_tables.php for a complete example.
These classes usually contain an up() and down() method to implement upgrades or downgrades to the next/previous schema.
Errors during Schema upgrades need to be handled by the implementer himself. There is no implicit rollback of schema upgrades which fail halfway through the up() method unless you implement an appropriate try/catch block yourself.
Check for all table's existence before adding them