summaryrefslogtreecommitdiff
path: root/app/Console/DatabaseMigrationCommand.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Console/DatabaseMigrationCommand.php')
-rw-r--r--app/Console/DatabaseMigrationCommand.php23
1 files changed, 23 insertions, 0 deletions
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 @@
+<?php
+
+namespace Kanboard\Console;
+
+use Kanboard\ServiceProvider\DatabaseProvider;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class DatabaseMigrationCommand extends DatabaseVersionCommand
+{
+ protected function configure()
+ {
+ $this
+ ->setName('db:migrate')
+ ->setDescription('Execute SQL migrations');
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ parent::execute($input, $output);
+ DatabaseProvider::runMigrations($this->container['db']);
+ }
+}