Issue #3100046 by alexpott, Wim Leers, super_romeo, quietone: Duplicate column name 'type'

merge-requests/2419/head
Alex Pott 2020-02-10 13:19:12 +00:00
parent af036f62df
commit 38fdab6bd6
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
2 changed files with 12 additions and 2 deletions

View File

@ -23,9 +23,16 @@ class FieldOptionTranslation extends Field {
->condition('objectid', '#allowed_values');
// Add all i18n and locales_target fields.
$query
->fields('i18n')
->fields('i18n', [
// All table fields except lid and type.
'textgroup',
'context',
'objectid',
'property',
'objectindex',
'format',
])
->fields('lt');
$query->addField('fc', 'type');
$query->addField('fci', 'bundle');
$query->addField('i18n', 'lid', 'i18n_lid');
$query->addField('i18n', 'type', 'i18n_type');

View File

@ -105,6 +105,9 @@ class MigrateFieldOptionTranslationTest extends MigrateDrupal7TestBase {
],
];
$this->assertSame($allowed_values, $config_translation->get('settings.allowed_values'));
// Ensure that the count query works as expected.
$this->assertCount(16, $this->getMigration('d7_field_option_translation')->getSourcePlugin());
}
}