$io->
comment('Create database'
);
$database->
createDatabase($dbConfig['dbname'
]);
break;
case 'clear':
$io->
comment('Clear database'
);
$database->
emptyDatabase($dbConfig['dbname'
]);
break;
case 'import':
$io->
comment('Import database'
);
$database->
importFile($dbConfig['dbname'
],
$rootDir . '/_sql/install/latest.sql'
);
$migrationManger =
new Manager($connection,
$rootDir . '/_sql/migrations'
);
$migrationManger->
run();
break;
case 'importDemodata':
$io->
comment('Import demodata'
);
$database->
importFile($dbConfig['dbname'
],
$rootDir . '/_sql/demo/latest.sql'
);
break;
case 'setupShop':