summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-08-14 09:52:07 +0200
committerJoas Schilling <coding@schilljs.com>2017-08-14 09:52:41 +0200
commit601f7951220fcbf896b8f50b772890f8adeb6267 (patch)
treeff6dbea2d3737e5c313d2ed57eb0be764af5e324
parent073216e8278983abef6ac51d6e0a900f95af0024 (diff)
downloadnextcloud-server-601f7951220fcbf896b8f50b772890f8adeb6267.tar.gz
nextcloud-server-601f7951220fcbf896b8f50b772890f8adeb6267.zip
Make sure the accounts table exists
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--core/Migrations/Version13000Date20170814074715.php59
-rw-r--r--version.php2
2 files changed, 60 insertions, 1 deletions
diff --git a/core/Migrations/Version13000Date20170814074715.php b/core/Migrations/Version13000Date20170814074715.php
new file mode 100644
index 00000000000..764ab8ab84e
--- /dev/null
+++ b/core/Migrations/Version13000Date20170814074715.php
@@ -0,0 +1,59 @@
+<?php
+namespace OC\Core\Migrations;
+
+use Doctrine\DBAL\Schema\Schema;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+
+/**
+ * Auto-generated migration step: Please modify to your needs!
+ */
+class Version13000Date20170814074715 extends SimpleMigrationStep {
+
+ /**
+ * @param IOutput $output
+ * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param array $options
+ * @since 13.0.0
+ */
+ public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
+ }
+
+ /**
+ * @param IOutput $output
+ * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param array $options
+ * @return null|Schema
+ * @since 13.0.0
+ */
+ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
+ /** @var Schema $schema */
+ $schema = $schemaClosure();
+
+
+ if (!$schema->hasTable('accounts')) {
+ $table = $schema->createTable('accounts');
+ $table->addColumn('uid', 'string', [
+ 'notnull' => true,
+ 'length' => 64,
+ 'default' => '',
+ ]);
+ $table->addColumn('data', 'text', [
+ 'notnull' => true,
+ 'default' => '',
+ ]);
+ $table->setPrimaryKey(['uid']);
+ }
+
+ return $schema;
+ }
+
+ /**
+ * @param IOutput $output
+ * @param \Closure $schemaClosure The `\Closure` returns a `Schema`
+ * @param array $options
+ * @since 13.0.0
+ */
+ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
+ }
+}
diff --git a/version.php b/version.php
index 649c8ae7389..03c03f43c8c 100644
--- a/version.php
+++ b/version.php
@@ -26,7 +26,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.
-$OC_Version = array(13, 0, 0, 2);
+$OC_Version = array(13, 0, 0, 3);
// The human readable string
$OC_VersionString = '13.0.0 alpha';