{"action":"closed","issue":{"url":"https://api.github.com/repos/hechoendrupal/drupal-console/issues/3766","repository_url":"https://api.github.com/repos/hechoendrupal/drupal-console","labels_url":"https://api.github.com/repos/hechoendrupal/drupal-console/issues/3766/labels{/name}","comments_url":"https://api.github.com/repos/hechoendrupal/drupal-console/issues/3766/comments","events_url":"https://api.github.com/repos/hechoendrupal/drupal-console/issues/3766/events","html_url":"https://github.com/hechoendrupal/drupal-console/issues/3766","id":295201887,"number":3766,"title":"[generate:entity:content] Content entities throw fatal errors when installed","user":{"login":"mikestefanello","id":552328,"avatar_url":"https://avatars2.githubusercontent.com/u/552328?v=4","gravatar_id":"","url":"https://api.github.com/users/mikestefanello","html_url":"https://github.com/mikestefanello","followers_url":"https://api.github.com/users/mikestefanello/followers","following_url":"https://api.github.com/users/mikestefanello/following{/other_user}","gists_url":"https://api.github.com/users/mikestefanello/gists{/gist_id}","starred_url":"https://api.github.com/users/mikestefanello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikestefanello/subscriptions","organizations_url":"https://api.github.com/users/mikestefanello/orgs","repos_url":"https://api.github.com/users/mikestefanello/repos","events_url":"https://api.github.com/users/mikestefanello/events{/privacy}","received_events_url":"https://api.github.com/users/mikestefanello/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-07T16:24:51Z","updated_at":"2018-02-07T17:40:51Z","closed_at":"2018-02-07T17:40:51Z","author_association":"NONE","body":"**Drupal 8.4.4\r\nDrupal console: 1.5.0**\r\n\r\nCreated a content entity. When trying to install the module that contains the entity type, I receive these errors:\r\n\r\n```\r\nPDOException: SQLSTATE[42000]: Syntax error or access violation: 1064[error]\r\nYou have an error in your SQL syntax; check the manual that\r\ncorresponds to your MySQL server version for the right syntax to use\r\nnear 'position (\r\n`id` INT unsigned NOT NULL auto_increment, \r\n`uuid` VARCHAR(128) CHARA' at line 1 in\r\n/var/www/docroot/core/lib/Drupal/Core/Database/Statement.php:59\r\nStack trace:\r\n#0 /var/www/docroot/core/lib/Drupal/Core/Database/Statement.php(59):\r\nPDOStatement->execute(Array)\r\n#1\r\n/var/www/docroot/core/lib/Drupal/Core/Database/Connection.php(625):\r\nDrupal\\Core\\Database\\Statement->execute(Array, Array)\r\n#2\r\n/var/www/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(87):\r\nDrupal\\Core\\Database\\Connection->query('CREATE TABLE {p...', Array,\r\nArray)\r\n#3 /var/www/docroot/core/lib/Drupal/Core/Database/Schema.php(602):\r\nDrupal\\Core\\Database\\Driver\\mysql\\Connection->query('CREATE TABLE\r\n{p...')\r\n#4\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php(288):\r\nDrupal\\Core\\Database\\Schema->createTable('position', Array)\r\n#5\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1409):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorageSchema->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#6\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1505):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->Drupal\\Core\\Entity\\Sql\\{closure}()\r\n#7\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1410):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->wrapSchemaException(Object(Closure))\r\n#8\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityTypeListener.php(71):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#9\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityManager.php(534):\r\nDrupal\\Core\\Entity\\EntityTypeListener->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#10\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(135):\r\nDrupal\\Core\\Entity\\EntityManager->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#11\r\n/var/www/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(234):\r\nDrupal\\Core\\Entity\\EntityDefinitionUpdateManager->installEntityType(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#12\r\n/var/www/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):\r\nDrupal\\Core\\Extension\\ModuleInstaller->install(Array, false)\r\n#13 /var/www/docroot/core/includes/install.core.inc(1805):\r\nDrupal\\Core\\ProxyClass\\Extension\\ModuleInstaller->install(Array,\r\nfalse)\r\n#14 /var/www/docroot/core/includes/batch.inc(294):\r\n_install_module_batch('my_module', 'my_module', Array)\r\n#15 /var/www/docroot/core/includes/form.inc(875): _batch_process()\r\n#16 /var/www/docroot/core/includes/install.core.inc(628):\r\nbatch_process(Object(Drupal\\Core\\Url), Object(Drupal\\Core\\Url))\r\n#17 /var/www/docroot/core/includes/install.core.inc(549):\r\ninstall_run_task(Array, Array)\r\n#18 /var/www/docroot/core/includes/install.core.inc(117):\r\ninstall_run_tasks(Array)\r\n#19 phar:///usr/local/bin/drush/includes/drush.inc(726):\r\ninstall_drupal(Object(Composer\\Autoload\\ClassLoader), Array)\r\n#20 phar:///usr/local/bin/drush/includes/drush.inc(711):\r\ndrush_call_user_func_array('install_drupal', Array)\r\n#21\r\nphar:///usr/local/bin/drush/commands/core/drupal/site_install.inc(82):\r\ndrush_op('install_drupal', Object(Composer\\Autoload\\ClassLoader),\r\nArray)\r\n#22\r\nphar:///usr/local/bin/drush/commands/core/site_install.drush.inc(255):\r\ndrush_core_site_install_version('my_install_profile', Array)\r\n#23 phar:///usr/local/bin/drush/includes/command.inc(422):\r\ndrush_core_site_install('my_install_profile')\r\n#24 phar:///usr/local/bin/drush/includes/command.inc(231):\r\n_drush_invoke_hooks(Array, Array)\r\n#25 phar:///usr/local/bin/drush/includes/command.inc(199):\r\ndrush_command('my_install_profile')\r\n#26 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67):\r\ndrush_dispatch(Array)\r\n#27 phar:///usr/local/bin/drush/includes/preflight.inc(66):\r\nDrush\\Boot\\BaseBoot->bootstrap_and_dispatch()\r\n#28 phar:///usr/local/bin/drush/includes/startup.inc(458):\r\ndrush_main()\r\n#29 phar:///usr/local/bin/drush/includes/startup.inc(365):\r\ndrush_run_main(false, '/', 'Phar detected. ...')\r\n#30 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)\r\n#31 /usr/local/bin/drush(10): require('phar:///usr/loc...')\r\n#32 {main}\r\n\r\nNext Drupal\\Core\\Database\\DatabaseExceptionWrapper: SQLSTATE[42000]:\r\nSyntax error or access violation: 1064 You have an error in your SQL\r\nsyntax; check the manual that corresponds to your MySQL server\r\nversion for the right syntax to use near 'position (\r\n`id` INT unsigned NOT NULL auto_increment, \r\n`uuid` VARCHAR(128) CHARA' at line 1: CREATE TABLE {position} (\r\n`id` INT unsigned NOT NULL auto_increment, \r\n`uuid` VARCHAR(128) CHARACTER SET ascii COLLATE ascii_general_ci NOT\r\nNULL, \r\n`langcode` VARCHAR(12) CHARACTER SET ascii COLLATE ascii_general_ci\r\nNOT NULL, \r\n`user_id` INT unsigned NOT NULL COMMENT 'The ID of the target\r\nentity.', \r\n`name` VARCHAR(50) NULL DEFAULT NULL, \r\n`status` TINYINT NOT NULL, \r\n`created` INT NULL DEFAULT NULL, \r\n`changed` INT NULL DEFAULT NULL, \r\nPRIMARY KEY (`id`), \r\nUNIQUE KEY `position_field__uuid__value` (`uuid`), \r\nINDEX `position_field__user_id__target_id` (`user_id`)\r\n) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'The base\r\ntable for position entities.'; Array\r\n(\r\n)\r\n in /var/www/docroot/core/lib/Drupal/Core/Database/Connection.php:686\r\nStack trace:\r\n#0\r\n/var/www/docroot/core/lib/Drupal/Core/Database/Connection.php(650):\r\nDrupal\\Core\\Database\\Connection->handleQueryException(Object(PDOException),\r\n'CREATE TABLE {p...', Array, Array)\r\n#1\r\n/var/www/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(87):\r\nDrupal\\Core\\Database\\Connection->query('CREATE TABLE {p...', Array,\r\nArray)\r\n#2 /var/www/docroot/core/lib/Drupal/Core/Database/Schema.php(602):\r\nDrupal\\Core\\Database\\Driver\\mysql\\Connection->query('CREATE TABLE\r\n{p...')\r\n#3\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php(288):\r\nDrupal\\Core\\Database\\Schema->createTable('position', Array)\r\n#4\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1409):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorageSchema->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#5\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1505):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->Drupal\\Core\\Entity\\Sql\\{closure}()\r\n#6\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1410):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->wrapSchemaException(Object(Closure))\r\n#7\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityTypeListener.php(71):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#8\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityManager.php(534):\r\nDrupal\\Core\\Entity\\EntityTypeListener->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#9\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(135):\r\nDrupal\\Core\\Entity\\EntityManager->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#10\r\n/var/www/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(234):\r\nDrupal\\Core\\Entity\\EntityDefinitionUpdateManager->installEntityType(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#11\r\n/var/www/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):\r\nDrupal\\Core\\Extension\\ModuleInstaller->install(Array, false)\r\n#12 /var/www/docroot/core/includes/install.core.inc(1805):\r\nDrupal\\Core\\ProxyClass\\Extension\\ModuleInstaller->install(Array,\r\nfalse)\r\n#13 /var/www/docroot/core/includes/batch.inc(294):\r\n_install_module_batch('my_module', 'my_module', Array)\r\n#14 /var/www/docroot/core/includes/form.inc(875): _batch_process()\r\n#15 /var/www/docroot/core/includes/install.core.inc(628):\r\nbatch_process(Object(Drupal\\Core\\Url), Object(Drupal\\Core\\Url))\r\n#16 /var/www/docroot/core/includes/install.core.inc(549):\r\ninstall_run_task(Array, Array)\r\n#17 /var/www/docroot/core/includes/install.core.inc(117):\r\ninstall_run_tasks(Array)\r\n#18 phar:///usr/local/bin/drush/includes/drush.inc(726):\r\ninstall_drupal(Object(Composer\\Autoload\\ClassLoader), Array)\r\n#19 phar:///usr/local/bin/drush/includes/drush.inc(711):\r\ndrush_call_user_func_array('install_drupal', Array)\r\n#20\r\nphar:///usr/local/bin/drush/commands/core/drupal/site_install.inc(82):\r\ndrush_op('install_drupal', Object(Composer\\Autoload\\ClassLoader),\r\nArray)\r\n#21\r\nphar:///usr/local/bin/drush/commands/core/site_install.drush.inc(255):\r\ndrush_core_site_install_version('my_install_profile', Array)\r\n#22 phar:///usr/local/bin/drush/includes/command.inc(422):\r\ndrush_core_site_install('my_install_profile')\r\n#23 phar:///usr/local/bin/drush/includes/command.inc(231):\r\n_drush_invoke_hooks(Array, Array)\r\n#24 phar:///usr/local/bin/drush/includes/command.inc(199):\r\ndrush_command('my_install_profile')\r\n#25 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67):\r\ndrush_dispatch(Array)\r\n#26 phar:///usr/local/bin/drush/includes/preflight.inc(66):\r\nDrush\\Boot\\BaseBoot->bootstrap_and_dispatch()\r\n#27 phar:///usr/local/bin/drush/includes/startup.inc(458):\r\ndrush_main()\r\n#28 phar:///usr/local/bin/drush/includes/startup.inc(365):\r\ndrush_run_main(false, '/', 'Phar detected. ...')\r\n#29 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)\r\n#30 /usr/local/bin/drush(10): require('phar:///usr/loc...')\r\n#31 {main}\r\n\r\nNext Drupal\\Core\\Entity\\EntityStorageException: Exception thrown\r\nwhile performing a schema update. SQLSTATE[42000]: Syntax error or\r\naccess violation: 1064 You have an error in your SQL syntax; check\r\nthe manual that corresponds to your MySQL server version for the\r\nright syntax to use near 'position (\r\n`id` INT unsigned NOT NULL auto_increment, \r\n`uuid` VARCHAR(128) CHARA' at line 1: CREATE TABLE {position} (\r\n`id` INT unsigned NOT NULL auto_increment, \r\n`uuid` VARCHAR(128) CHARACTER SET ascii COLLATE ascii_general_ci NOT\r\nNULL, \r\n`langcode` VARCHAR(12) CHARACTER SET ascii COLLATE ascii_general_ci\r\nNOT NULL, \r\n`user_id` INT unsigned NOT NULL COMMENT 'The ID of the target\r\nentity.', \r\n`name` VARCHAR(50) NULL DEFAULT NULL, \r\n`status` TINYINT NOT NULL, \r\n`created` INT NULL DEFAULT NULL, \r\n`changed` INT NULL DEFAULT NULL, \r\nPRIMARY KEY (`id`), \r\nUNIQUE KEY `position_field__uuid__value` (`uuid`), \r\nINDEX `position_field__user_id__target_id` (`user_id`)\r\n) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'The base\r\ntable for position entities.'; Array\r\n(\r\n)\r\n in\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:1513\r\nStack trace:\r\n#0\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1410):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->wrapSchemaException(Object(Closure))\r\n#1\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityTypeListener.php(71):\r\nDrupal\\Core\\Entity\\Sql\\SqlContentEntityStorage->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#2\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityManager.php(534):\r\nDrupal\\Core\\Entity\\EntityTypeListener->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#3\r\n/var/www/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(135):\r\nDrupal\\Core\\Entity\\EntityManager->onEntityTypeCreate(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#4\r\n/var/www/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(234):\r\nDrupal\\Core\\Entity\\EntityDefinitionUpdateManager->installEntityType(Object(Drupal\\Core\\Entity\\ContentEntityType))\r\n#5\r\n/var/www/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):\r\nDrupal\\Core\\Extension\\ModuleInstaller->install(Array, false)\r\n#6 /var/www/docroot/core/includes/install.core.inc(1805):\r\nDrupal\\Core\\ProxyClass\\Extension\\ModuleInstaller->install(Array,\r\nfalse)\r\n#7 /var/www/docroot/core/includes/batch.inc(294):\r\n_install_module_batch('my_module', 'my_module', Array)\r\n#8 /var/www/docroot/core/includes/form.inc(875): _batch_process()\r\n#9 /var/www/docroot/core/includes/install.core.inc(628):\r\nbatch_process(Object(Drupal\\Core\\Url), Object(Drupal\\Core\\Url))\r\n#10 /var/www/docroot/core/includes/install.core.inc(549):\r\ninstall_run_task(Array, Array)\r\n#11 /var/www/docroot/core/includes/install.core.inc(117):\r\ninstall_run_tasks(Array)\r\n#12 phar:///usr/local/bin/drush/includes/drush.inc(726):\r\ninstall_drupal(Object(Composer\\Autoload\\ClassLoader), Array)\r\n#13 phar:///usr/local/bin/drush/includes/drush.inc(711):\r\ndrush_call_user_func_array('install_drupal', Array)\r\n#14\r\nphar:///usr/local/bin/drush/commands/core/drupal/site_install.inc(82):\r\ndrush_op('install_drupal', Object(Composer\\Autoload\\ClassLoader),\r\nArray)\r\n#15\r\nphar:///usr/local/bin/drush/commands/core/site_install.drush.inc(255):\r\ndrush_core_site_install_version('my_install_profile', Array)\r\n#16 phar:///usr/local/bin/drush/includes/command.inc(422):\r\ndrush_core_site_install('my_install_profile')\r\n#17 phar:///usr/local/bin/drush/includes/command.inc(231):\r\n_drush_invoke_hooks(Array, Array)\r\n#18 phar:///usr/local/bin/drush/includes/command.inc(199):\r\ndrush_command('my_install_profile')\r\n#19 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67):\r\ndrush_dispatch(Array)\r\n#20 phar:///usr/local/bin/drush/includes/preflight.inc(66):\r\nDrush\\Boot\\BaseBoot->bootstrap_and_dispatch()\r\n#21 phar:///usr/local/bin/drush/includes/startup.inc(458):\r\ndrush_main()\r\n#22 phar:///usr/local/bin/drush/includes/startup.inc(365):\r\ndrush_run_main(false, '/', 'Phar detected. ...')\r\n#23 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)\r\n#24 /usr/local/bin/drush(10): require('phar:///usr/loc...')\r\n#25 {main}\r\n\r\n\r\n```"}}
{"actor":{"display_login":"mikestefanello"}}