From 29a21466f37a7fed4263ecefcbe658b510d1a3f3 Mon Sep 17 00:00:00 2001
From: ringmaster <epithet@gmail.com>
Date: Thu, 24 Oct 2013 13:59:39 -0400
Subject: [PATCH] Add `occ upgrade` command.

---
 core/command/upgrade.php  | 28 ++++++++++++++++++++++++++++
 core/register_command.php |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 core/command/upgrade.php

diff --git a/core/command/upgrade.php b/core/command/upgrade.php
new file mode 100644
index 0000000000..c6551747d3
--- /dev/null
+++ b/core/command/upgrade.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright (c) 2013 Owen Winkler <ringmaster@midnightcircus.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Core\Command;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class Upgrade extends Command {
+	protected function configure() {
+		$this
+			->setName('upgrade')
+			->setDescription('run upgrade routines')
+		;
+	}
+
+	protected function execute(InputInterface $input, OutputInterface $output) {
+		include \OC::$SERVERROOT . '/upgrade.php';
+	}
+}
diff --git a/core/register_command.php b/core/register_command.php
index 683e7ae183..cfea1a6b88 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -9,3 +9,4 @@
 /** @var $application Symfony\Component\Console\Application */
 $application->add(new OC\Core\Command\Status);
 $application->add(new OC\Core\Command\Db\GenerateChangeScript());
+$application->add(new OC\Core\Command\Upgrade());
-- 
GitLab