Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-03-27 13:42:33 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-27 15:32:59 +0300
commit274658629d2f7e72de123a8763f2578f79cb3376 (patch)
tree4af81fdbc7c3440f9657b24fe46037a23f741a46 /core/Application.php
parent86594e8c18123db6696f4cedfc0578d036ad5dd6 (diff)
Make sure all tables have named indexes
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Application.php')
-rw-r--r--core/Application.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/core/Application.php b/core/Application.php
index 94990df9356..1a7cf8aa10c 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -93,6 +93,44 @@ class Application extends App {
$subject->addHintForMissingSubject($table->getName(), 'twofactor_providers_uid');
}
}
+
+ if ($schema->hasTable('login_flow_v2')) {
+ $table = $schema->getTable('login_flow_v2');
+
+ if (!$table->hasIndex('poll_token')) {
+ $subject->addHintForMissingSubject($table->getName(), 'poll_token');
+ }
+ if (!$table->hasIndex('login_token')) {
+ $subject->addHintForMissingSubject($table->getName(), 'login_token');
+ }
+ if (!$table->hasIndex('timestamp')) {
+ $subject->addHintForMissingSubject($table->getName(), 'timestamp');
+ }
+ }
+
+ if ($schema->hasTable('whats_new')) {
+ $table = $schema->getTable('whats_new');
+
+ if (!$table->hasIndex('version')) {
+ $subject->addHintForMissingSubject($table->getName(), 'version');
+ }
+ }
+
+ if ($schema->hasTable('cards')) {
+ $table = $schema->getTable('cards');
+
+ if (!$table->hasIndex('addressbookid')) {
+ $subject->addHintForMissingSubject($table->getName(), 'addressbookid');
+ }
+ }
+
+ if ($schema->hasTable('cards_properties')) {
+ $table = $schema->getTable('cards_properties');
+
+ if (!$table->hasIndex('addressbookid')) {
+ $subject->addHintForMissingSubject($table->getName(), 'addressbookid');
+ }
+ }
}
);
}