diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-22 11:37:04 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-01 20:56:59 +0100 |
commit | 411350540d137d80c71f1382a667a794dc24821f (patch) | |
tree | a0657fc737804597636d82764a893e241b6c19a1 /core/Migrations | |
parent | 066238a99074e27122901f4364e26acdfcb4e6dc (diff) | |
download | nextcloud-server-411350540d137d80c71f1382a667a794dc24821f.tar.gz nextcloud-server-411350540d137d80c71f1382a667a794dc24821f.zip |
Also cache the resource type because it is part of the identifier
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Migrations')
-rw-r--r-- | core/Migrations/Version16000Date20190207141427.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index bc1c7e24a8c..c74c3ee1c36 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -85,6 +85,11 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { 'notnull' => false, 'default' => 0, ]); + $table->addColumn('resource_type', Type::STRING, [ + 'notnull' => false, + 'length' => 64, + 'default' => '', + ]); $table->addColumn('resource_id', Type::STRING, [ 'notnull' => false, 'length' => 64, @@ -95,8 +100,8 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { 'default' => 0, ]); - $table->addUniqueIndex(['user_id', 'collection_id', 'resource_id'], 'collres_unique_user'); - $table->addIndex(['user_id', 'resource_id'], 'collres_user_res'); + $table->addUniqueIndex(['user_id', 'collection_id', 'resource_type', 'resource_id'], 'collres_unique_user'); + $table->addIndex(['user_id', 'resource_type', 'resource_id'], 'collres_user_res'); $table->addIndex(['user_id', 'collection_id'], 'collres_user_coll'); } |