diff --git a/apps/dav/lib/Migration/Version1004Date20170924124212.php b/apps/dav/lib/Migration/Version1004Date20170924124212.php
index 5a684b6a92..7a87f6d2b0 100644
--- a/apps/dav/lib/Migration/Version1004Date20170924124212.php
+++ b/apps/dav/lib/Migration/Version1004Date20170924124212.php
@@ -40,10 +40,10 @@ class Version1004Date20170924124212 extends SimpleMigrationStep {
$schema = $schemaClosure();
$table = $schema->getTable('cards');
- $table->addIndex(['addressbookid'], 'addressbookid');
+ $table->addIndex(['addressbookid'], 'cards_abid');
$table = $schema->getTable('cards_properties');
- $table->addIndex(['addressbookid'], 'addressbookid');
+ $table->addIndex(['addressbookid'], 'cards_prop_abid');
return $schema;
}
diff --git a/core/Application.php b/core/Application.php
index 1a7cf8aa10..5ba07e2cb4 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -119,16 +119,16 @@ class Application extends App {
if ($schema->hasTable('cards')) {
$table = $schema->getTable('cards');
- if (!$table->hasIndex('addressbookid')) {
- $subject->addHintForMissingSubject($table->getName(), 'addressbookid');
+ if (!$table->hasIndex('cards_abid')) {
+ $subject->addHintForMissingSubject($table->getName(), 'cards_abid');
}
}
if ($schema->hasTable('cards_properties')) {
$table = $schema->getTable('cards_properties');
- if (!$table->hasIndex('addressbookid')) {
- $subject->addHintForMissingSubject($table->getName(), 'addressbookid');
+ if (!$table->hasIndex('cards_prop_abid')) {
+ $subject->addHintForMissingSubject($table->getName(), 'cards_prop_abid');
}
}
}
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php
index 9df76f67b7..0bb6658e85 100644
--- a/core/Command/Db/AddMissingIndices.php
+++ b/core/Command/Db/AddMissingIndices.php
@@ -186,8 +186,8 @@ class AddMissingIndices extends Command {
$output->writeln('Check indices of the cards table.');
if ($schema->hasTable('cards')) {
$table = $schema->getTable('cards');
- if (!$table->hasIndex('addressbookid')) {
- $output->writeln('Adding addressbookid index to the cards table, this can take some time...');
+ if (!$table->hasIndex('cards_abid')) {
+ $output->writeln('Adding cards_abid index to the cards table, this can take some time...');
foreach ($table->getIndexes() as $index) {
if ($index->getColumns() === ['addressbookid']) {
@@ -195,7 +195,7 @@ class AddMissingIndices extends Command {
}
}
- $table->addIndex(['addressbookid'], 'addressbookid');
+ $table->addIndex(['addressbookid'], 'cards_abid');
$this->connection->migrateToSchema($schema->getWrappedSchema());
$updated = true;
$output->writeln('cards table updated successfully.');
@@ -205,8 +205,8 @@ class AddMissingIndices extends Command {
$output->writeln('Check indices of the cards_properties table.');
if ($schema->hasTable('cards_properties')) {
$table = $schema->getTable('cards_properties');
- if (!$table->hasIndex('addressbookid')) {
- $output->writeln('Adding addressbookid index to the cards_properties table, this can take some time...');
+ if (!$table->hasIndex('cards_prop_abid')) {
+ $output->writeln('Adding cards_prop_abid index to the cards_properties table, this can take some time...');
foreach ($table->getIndexes() as $index) {
if ($index->getColumns() === ['addressbookid']) {
@@ -214,7 +214,7 @@ class AddMissingIndices extends Command {
}
}
- $table->addIndex(['addressbookid'], 'addressbookid');
+ $table->addIndex(['addressbookid'], 'cards_prop_abid');
$this->connection->migrateToSchema($schema->getWrappedSchema());
$updated = true;
$output->writeln('cards_properties table updated successfully.');