aboutsummaryrefslogtreecommitdiffstats
path: root/core/Migrations
diff options
context:
space:
mode:
Diffstat (limited to 'core/Migrations')
-rw-r--r--core/Migrations/Version13000Date20170718121200.php1
-rw-r--r--core/Migrations/Version14000Date20180129121024.php7
-rw-r--r--core/Migrations/Version14000Date20180404140050.php8
-rw-r--r--core/Migrations/Version14000Date20180518120534.php54
-rw-r--r--core/Migrations/Version14000Date20180522074438.php63
-rw-r--r--core/Migrations/Version14000Date20180626223656.php69
6 files changed, 202 insertions, 0 deletions
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php
index 139129eb600..05623e435c3 100644
--- a/core/Migrations/Version13000Date20170718121200.php
+++ b/core/Migrations/Version13000Date20170718121200.php
@@ -401,6 +401,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
$table->addIndex(['file_source'], 'file_source_index');
$table->addIndex(['token'], 'token_index');
$table->addIndex(['share_with'], 'share_with_index');
+ $table->addIndex(['parent'], 'parent_index');
}
if (!$schema->hasTable('jobs')) {
diff --git a/core/Migrations/Version14000Date20180129121024.php b/core/Migrations/Version14000Date20180129121024.php
index eedd99d014e..9512d4adafd 100644
--- a/core/Migrations/Version14000Date20180129121024.php
+++ b/core/Migrations/Version14000Date20180129121024.php
@@ -30,6 +30,13 @@ use OCP\Migration\IOutput;
* Delete the admin|personal sections and settings tables
*/
class Version14000Date20180129121024 extends SimpleMigrationStep {
+ public function name(): string {
+ return 'Drop obsolete settings tables';
+ }
+
+ public function description(): string {
+ return 'Drops the following obsolete tables: "admin_sections", "admin_settings", "personal_sections" and "personal_settings"';
+ }
/**
* @param IOutput $output
diff --git a/core/Migrations/Version14000Date20180404140050.php b/core/Migrations/Version14000Date20180404140050.php
index d7077caa149..86705f21d53 100644
--- a/core/Migrations/Version14000Date20180404140050.php
+++ b/core/Migrations/Version14000Date20180404140050.php
@@ -41,6 +41,14 @@ class Version14000Date20180404140050 extends SimpleMigrationStep {
$this->connection = $connection;
}
+ public function name(): string {
+ return 'Add lowercase user id column to users table';
+ }
+
+ public function description(): string {
+ return 'Adds "uid_lower" column to the users table and fills the column to allow indexed case-insensitive searches';
+ }
+
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
diff --git a/core/Migrations/Version14000Date20180518120534.php b/core/Migrations/Version14000Date20180518120534.php
new file mode 100644
index 00000000000..a738c6baa7e
--- /dev/null
+++ b/core/Migrations/Version14000Date20180518120534.php
@@ -0,0 +1,54 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Core\Migrations;
+
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+
+class Version14000Date20180518120534 extends SimpleMigrationStep {
+
+ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('authtoken');
+ $table->addColumn('private_key', 'text', [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('public_key', 'text', [
+ 'notnull' => false,
+ ]);
+ $table->addColumn('version', 'smallint', [
+ 'notnull' => true,
+ 'default' => 1,
+ 'unsigned' => true,
+ ]);
+ $table->addIndex(['uid'], 'authtoken_uid_index');
+ $table->addIndex(['version'], 'authtoken_version_index');
+
+ return $schema;
+ }
+}
diff --git a/core/Migrations/Version14000Date20180522074438.php b/core/Migrations/Version14000Date20180522074438.php
new file mode 100644
index 00000000000..28207d0b900
--- /dev/null
+++ b/core/Migrations/Version14000Date20180522074438.php
@@ -0,0 +1,63 @@
+<?php
+declare(strict_types=1);
+
+/**
+ * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Core\Migrations;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version14000Date20180522074438 extends SimpleMigrationStep {
+
+ public function changeSchema(IOutput $output, Closure $schemaClosure,
+ array $options): ISchemaWrapper {
+
+ $schema = $schemaClosure();
+
+ if (!$schema->hasTable('twofactor_providers')) {
+ $table = $schema->createTable('twofactor_providers');
+ $table->addColumn('provider_id', 'string',
+ [
+ 'notnull' => true,
+ 'length' => 32,
+ ]);
+ $table->addColumn('uid', 'string',
+ [
+ 'notnull' => true,
+ 'length' => 64,
+ ]);
+ $table->addColumn('enabled', 'smallint',
+ [
+ 'notnull' => true,
+ 'length' => 1,
+ ]);
+ $table->setPrimaryKey(['provider_id', 'uid']);
+ }
+
+ return $schema;
+ }
+
+}
diff --git a/core/Migrations/Version14000Date20180626223656.php b/core/Migrations/Version14000Date20180626223656.php
new file mode 100644
index 00000000000..fb7a6c647bc
--- /dev/null
+++ b/core/Migrations/Version14000Date20180626223656.php
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * @copyright Copyright (c) 2018 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Core\Migrations;
+
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version14000Date20180626223656 extends SimpleMigrationStep {
+ public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+ if(!$schema->hasTable('whats_new')) {
+ $table = $schema->createTable('whats_new');
+ $table->addColumn('id', 'integer', [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ 'length' => 4,
+ 'unsigned' => true,
+ ]);
+ $table->addColumn('version', 'string', [
+ 'notnull' => true,
+ 'length' => 64,
+ 'default' => '11',
+ ]);
+ $table->addColumn('etag', 'string', [
+ 'notnull' => true,
+ 'length' => 64,
+ 'default' => '',
+ ]);
+ $table->addColumn('last_check', 'integer', [
+ 'notnull' => true,
+ 'length' => 4,
+ 'unsigned' => true,
+ 'default' => 0,
+ ]);
+ $table->addColumn('data', 'text', [
+ 'notnull' => true,
+ 'default' => '',
+ ]);
+ $table->setPrimaryKey(['id']);
+ $table->addUniqueIndex(['version']);
+ $table->addIndex(['version', 'etag'], 'version_etag_idx');
+ }
+
+ return $schema;
+ }
+}