From f2fd5d75d98e01ab58a71b718d630b9b2ae8e16f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 2 Dec 2016 19:16:50 -0500 Subject: Add config parameter to toggle automatic SQL migrations - Add two command line opterations to show schema version and to execute SQL migrations - Add new configuration parameter to enable or disable SQL migrations --- app/Console/DatabaseMigrationCommand.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/Console/DatabaseMigrationCommand.php (limited to 'app/Console/DatabaseMigrationCommand.php') diff --git a/app/Console/DatabaseMigrationCommand.php b/app/Console/DatabaseMigrationCommand.php new file mode 100644 index 00000000..252d4369 --- /dev/null +++ b/app/Console/DatabaseMigrationCommand.php @@ -0,0 +1,23 @@ +setName('db:migrate') + ->setDescription('Execute SQL migrations'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + parent::execute($input, $output); + DatabaseProvider::runMigrations($this->container['db']); + } +} -- cgit v1.2.3