From 0bcb0187c1b84e7ed48b96a22378c9be6868a619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 5 Jul 2020 16:45:38 +0200 Subject: [PATCH] MAPG-185 rename migrate database command --- mapg | 2 +- scripts/install.sh | 2 +- scripts/update.sh | 2 +- src/Cli/{DatabaseMigration.php => MigrateDatabaseCommand.php} | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 mapg rename src/Cli/{DatabaseMigration.php => MigrateDatabaseCommand.php} (97%) 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.'); }