diff --git a/mapg b/mapg old mode 100644 new mode 100755 index 684c7b4..65ffefd --- a/mapg +++ b/mapg @@ -5,7 +5,7 @@ require 'main.php'; $app = new Symfony\Component\Console\Application('MapGuesser Console', ''); -$app->add(new MapGuesser\Cli\DatabaseMigration()); +$app->add(new MapGuesser\Cli\MigrateDatabaseCommand()); $app->add(new MapGuesser\Cli\AddUserCommand()); $app->add(new MapGuesser\Cli\LinkViewCommand()); $app->add(new \MapGuesser\Cli\MaintainDatabaseCommand()); diff --git a/scripts/install.sh b/scripts/install.sh index d6191c5..2ba224f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -16,7 +16,7 @@ echo "Installing MapGuesser DB..." mysql --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} ${DB_NAME} < ${ROOT_DIR}/db/mapguesser.sql echo "Migrating DB..." -(cd ${ROOT_DIR} && ./mapg migrate) +(cd ${ROOT_DIR} && ./mapg db:migrate) if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then echo "Minifying JS, CSS and SVG files..." diff --git a/scripts/update.sh b/scripts/update.sh index 8c44bc4..2bd04b6 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -15,7 +15,7 @@ echo "Installing Yarn packages..." (cd ${ROOT_DIR}/public/static && yarn install) echo "Migrating DB..." -(cd ${ROOT_DIR} && ./mapg migrate) +(cd ${ROOT_DIR} && ./mapg db:migrate) if [ -z "${DEV}" ] || [ "${DEV}" -eq "0" ]; then echo "Minifying JS, CSS and SVG files..." diff --git a/src/Cli/DatabaseMigration.php b/src/Cli/MigrateDatabaseCommand.php similarity index 97% rename from src/Cli/DatabaseMigration.php rename to src/Cli/MigrateDatabaseCommand.php index f7f600b..ac81743 100644 --- a/src/Cli/DatabaseMigration.php +++ b/src/Cli/MigrateDatabaseCommand.php @@ -7,11 +7,11 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class DatabaseMigration extends Command +class MigrateDatabaseCommand extends Command { public function configure() { - $this->setName('migrate') + $this->setName('db:migrate') ->setDescription('Migration of database changes.'); }