When I try to CIM to environment that already has flag installed and enabled, I get the following error:

exception 'Drupal\Core\Database\SchemaObjectExistsException' with message 'Table flag_counts already exists.' in /var/www/foo_bar/docroot/core/lib/Drupal/Core/Database/Schema.php:594 [error]
Stack trace:
#0 /var/www/foo_bar/docroot/core/includes/database.inc(582): Drupal\Core\Database\Schema->createTable('flag_counts', Array)
#1 /var/www/foo_bar/docroot/core/includes/schema.inc(122): db_create_table('flag_counts', Array)
#2 /var/www/foo_bar/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(197): drupal_install_schema('flag')
#3 /var/www/foo_bar/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#4 /var/www/foo_bar/docroot/core/lib/Drupal/Core/Config/ConfigImporter.php(786): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, false)
#5 /var/www/foo_bar/docroot/core/lib/Drupal/Core/Config/ConfigImporter.php(551): Drupal\Core\Config\ConfigImporter->processExtension('module', 'install', 'flag')
#6 /var/www/foo_bar/docroot/core/lib/Drupal/Core/Config/ConfigImporter.php(488): Drupal\Core\Config\ConfigImporter->processExtensions(Array)
#7 /var/www/foo_bar/vendor/drush/drush/commands/core/config.drush.inc(738): Drupal\Core\Config\ConfigImporter->doSyncStep('processExtensio...', Array)
#8 /var/www/foo_bar/vendor/drush/drush/includes/drush.inc(725): _drush_config_import(Object(Drupal\Core\Config\StorageComparer))
#9 /var/www/foo_bar/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('_drush_config_i...', Array)
#10 /var/www/foo_bar/vendor/drush/drush/commands/core/config.drush.inc(709): drush_op('_drush_config_i...', Object(Drupal\Core\Config\StorageComparer))
#11 [internal function]: drush_config_import()
#12 /var/www/foo_bar/vendor/drush/drush/includes/command.inc(422): call_user_func_array('drush_config_im...', Array)
#13 /var/www/foo_bar/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#14 [internal function]: drush_command()
#15 /var/www/foo_bar/vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command', Array)
#16 /var/www/foo_bar/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#17 /var/www/foo_bar/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#18 /var/www/foo_bar/vendor/drush/drush/drush.php(12): drush_main()
#19 {main}

The only way I have been able to solve is to drop the table from the database and run CIM again.

Comments

robpowell created an issue. See original summary.

robpowell’s picture

I am going to close. This seemed to be a local problem with our config-import.

robpowell’s picture

Status: Active » Closed (works as designed)