$db->setLogger($logger);
}
+switch ($action) {
+case 'up':
+ $cli->message('Migrating DB up.');
+ break;
+
+case 'down':
+ $cli->message('Migrating DB down.');
+ break;
+
+case 'migrate':
+ $cli->message('Migrating DB to schema version ' . $targetVersion . '.');
+ break;
+}
+
foreach ($apps as $key => $app) {
$migrator = new Horde_Db_Migration_Migrator($db, $logger, array('migrationsPath' => $dirs[$key], 'schemaTableName' => $app . '_schema_info'));
try {
switch ($action) {
case 'up':
- $cli->message('Migrating DB up.');
$migrator->up();
break;
case 'down':
- $cli->message('Migrating DB down.');
$migrator->down();
break;
case 'migrate':
- $cli->message('Migrating DB to schema version ' . $targetVersion . '.');
$migrator->migrate($targetVersion);
break;
}