From 7961a0b446c1f034f775d0c715a1692ca08646de Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Tue, 3 Mar 2020 13:10:41 +0100 Subject: [PATCH 1/2] Add indices to original DAV migration Signed-off-by: Georg Ehrke --- apps/dav/lib/Migration/Version1004Date20170825134824.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/dav/lib/Migration/Version1004Date20170825134824.php b/apps/dav/lib/Migration/Version1004Date20170825134824.php index 81107a7c75..10e6028ba1 100644 --- a/apps/dav/lib/Migration/Version1004Date20170825134824.php +++ b/apps/dav/lib/Migration/Version1004Date20170825134824.php @@ -369,6 +369,7 @@ class Version1004Date20170825134824 extends SimpleMigrationStep { 'unsigned' => true, ]); $table->setPrimaryKey(['id']); + $table->addIndex(['principaluri'], 'schedulobj_principuri_index'); } if (!$schema->hasTable('cards_properties')) { @@ -444,6 +445,7 @@ class Version1004Date20170825134824 extends SimpleMigrationStep { $table->addIndex(['objectid'], 'calendarobject_index'); $table->addIndex(['name'], 'calendarobject_name_index'); $table->addIndex(['value'], 'calendarobject_value_index'); + $table->addIndex(['calendarid', 'calendartype'], 'calendarobject_calid_index'); } if (!$schema->hasTable('dav_shares')) { From 79dcd34a071d621a41a84448bbf5c66fd21b9c03 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Tue, 3 Mar 2020 13:12:58 +0100 Subject: [PATCH 2/2] Create Mount IDs as BigInt by default Signed-off-by: Georg Ehrke --- apps/dav/lib/Migration/Version1004Date20170825134824.php | 1 - apps/dav/lib/Migration/Version1006Date20180628111625.php | 1 + core/Migrations/Version13000Date20170718121200.php | 9 ++++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/dav/lib/Migration/Version1004Date20170825134824.php b/apps/dav/lib/Migration/Version1004Date20170825134824.php index 10e6028ba1..d25e387e32 100644 --- a/apps/dav/lib/Migration/Version1004Date20170825134824.php +++ b/apps/dav/lib/Migration/Version1004Date20170825134824.php @@ -445,7 +445,6 @@ class Version1004Date20170825134824 extends SimpleMigrationStep { $table->addIndex(['objectid'], 'calendarobject_index'); $table->addIndex(['name'], 'calendarobject_name_index'); $table->addIndex(['value'], 'calendarobject_value_index'); - $table->addIndex(['calendarid', 'calendartype'], 'calendarobject_calid_index'); } if (!$schema->hasTable('dav_shares')) { diff --git a/apps/dav/lib/Migration/Version1006Date20180628111625.php b/apps/dav/lib/Migration/Version1006Date20180628111625.php index a09bb070d8..08a5951d8d 100644 --- a/apps/dav/lib/Migration/Version1006Date20180628111625.php +++ b/apps/dav/lib/Migration/Version1006Date20180628111625.php @@ -92,6 +92,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep { $calendarObjectsPropsTable->addIndex(['objectid', 'calendartype'], 'calendarobject_index'); $calendarObjectsPropsTable->addIndex(['name', 'calendartype'], 'calendarobject_name_index'); $calendarObjectsPropsTable->addIndex(['value', 'calendartype'], 'calendarobject_value_index'); + $calendarObjectsPropsTable->addIndex(['calendarid', 'calendartype'], 'calendarobject_calid_index'); } if ($schema->hasTable('calendarsubscriptions')) { diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index e9f376a7e4..8fcce96154 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -94,11 +94,13 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'notnull' => true, 'length' => 4, ]); - $table->addColumn('storage_id', 'integer', [ + $table->addColumn('storage_id', Type::BIGINT, [ 'notnull' => true, + 'length' => 20, ]); - $table->addColumn('root_id', 'integer', [ + $table->addColumn('root_id', Type::BIGINT, [ 'notnull' => true, + 'length' => 20, ]); $table->addColumn('user_id', 'string', [ 'notnull' => true, @@ -108,8 +110,9 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'notnull' => true, 'length' => 4000, ]); - $table->addColumn('mount_id', 'integer', [ + $table->addColumn('mount_id', Type::BIGINT, [ 'notnull' => false, + 'length' => 20, ]); $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'mounts_user_index');