aboutsummaryrefslogtreecommitdiffstats
path: root/core/Application.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-03-27 11:42:33 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-27 13:32:59 +0100
commit274658629d2f7e72de123a8763f2578f79cb3376 (patch)
tree4af81fdbc7c3440f9657b24fe46037a23f741a46 /core/Application.php
parent86594e8c18123db6696f4cedfc0578d036ad5dd6 (diff)
downloadnextcloud-server-274658629d2f7e72de123a8763f2578f79cb3376.tar.gz
nextcloud-server-274658629d2f7e72de123a8763f2578f79cb3376.zip
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');
+ }
+ }
}
);
}