diff -u b/core/modules/migrate/migrate.install b/core/modules/migrate/migrate.install --- b/core/modules/migrate/migrate.install +++ b/core/modules/migrate/migrate.install @@ -24,45 +24,6 @@ } /** - * Add langcode column for EntityRevision destinations. - */ -function migrate_update_8501() { - /** @var \Drupal\migrate\Plugin\MigrationPluginManager $migration_plugin_manager */ - $migration_plugin_manager = \Drupal::service('plugin.manager.migration'); - $version_tags = ['Drupal 6', 'Drupal 7']; - foreach ($version_tags as $version_tag) { - /** @var \Drupal\migrate\Plugin\Migration[] $all_migrations */ - $all_migrations = $migration_plugin_manager->createInstancesByTag($version_tag); - foreach ($all_migrations as $migration) { - try { - $destination_plugin = $migration->getDestinationPlugin(); - if ($destination_plugin instanceof EntityRevision && $migration->getIdMap() instanceof Sql && $migration instanceof EntityContentBase && $migration->isTranslationDestination()) { - /** @var Sql $id_map */ - $id_map = $migration->getIdMap(); - $count = 1; - $fields = []; - foreach ($migration->getDestinationPlugin()->getIds() as $id_definition) { - $map_key = 'destid' . $count++; - $fields[$map_key] = _migrate_get_field_schema($id_definition); - $fields[$map_key]['not null'] = FALSE; - } - $table = $id_map->getQualifiedMapTableName(); - foreach ($fields as $column => $spec) { - if (!$id_map->getDatabase()->schema()->fieldExists($table, $column)) { - $id_map->getDatabase()->schema()->addField($table, $column, $spec); - } - } - } - } catch (RequirementsException $e) { - // Migrations which are not applicable given the source and destination - // site configurations (e.g., what modules are enabled) will be silently - // ignored. - } - } - } -} - -/** * Copy of Sql::getFieldSchema() for use by updates. * * @param array $id_definition