Issue #3085192 by Wim Leers, focus13, grasmash: Add index on source_ids_hash for migrate_message_* tables

(cherry picked from commit f1c06e87e0)
merge-requests/72/merge
Alex Pott 2021-09-20 23:10:58 +01:00
parent 7d047b209a
commit d4e4f7c1d3
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
2 changed files with 4 additions and 0 deletions

View File

@ -441,6 +441,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryP
'description' => 'Messages generated during a migration process',
'fields' => $fields,
'primary key' => ['msgid'],
'indexes' => [$this::SOURCE_IDS_HASH => [$this::SOURCE_IDS_HASH]],
];
$this->getDatabase()->schema()->createTable($this->messageTableName(), $schema);
}

View File

@ -109,6 +109,9 @@ class MigrateSqlIdMapEnsureTablesTest extends MigrateTestCase {
'description' => 'Messages generated during a migration process',
'fields' => $fields,
'primary key' => ['msgid'],
'indexes' => [
'source_ids_hash' => ['source_ids_hash'],
],
];
$schema = $this->getMockBuilder('Drupal\Core\Database\Schema')