{"action":"created","issue":{"url":"https://api.github.com/repos/craftcms/cms/issues/2807","repository_url":"https://api.github.com/repos/craftcms/cms","labels_url":"https://api.github.com/repos/craftcms/cms/issues/2807/labels{/name}","comments_url":"https://api.github.com/repos/craftcms/cms/issues/2807/comments","events_url":"https://api.github.com/repos/craftcms/cms/issues/2807/events","html_url":"https://github.com/craftcms/cms/issues/2807","id":317790078,"number":2807,"title":"Update from 3.0.3.1 to 3.0.4 - Database error: \"Duplicate key name\"","user":{"login":"MrGlasspoole","id":2067170,"avatar_url":"https://avatars1.githubusercontent.com/u/2067170?v=4","gravatar_id":"","url":"https://api.github.com/users/MrGlasspoole","html_url":"https://github.com/MrGlasspoole","followers_url":"https://api.github.com/users/MrGlasspoole/followers","following_url":"https://api.github.com/users/MrGlasspoole/following{/other_user}","gists_url":"https://api.github.com/users/MrGlasspoole/gists{/gist_id}","starred_url":"https://api.github.com/users/MrGlasspoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrGlasspoole/subscriptions","organizations_url":"https://api.github.com/users/MrGlasspoole/orgs","repos_url":"https://api.github.com/users/MrGlasspoole/repos","events_url":"https://api.github.com/users/MrGlasspoole/events{/privacy}","received_events_url":"https://api.github.com/users/MrGlasspoole/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-04-25T20:54:14Z","updated_at":"2018-05-04T14:44:22Z","closed_at":"2018-05-04T10:13:38Z","author_association":"NONE","body":"Just started with Craft yesterday and today there was the update to 3.0.4 at the backend.\r\nI clicked it and now i have the message that there is an migration error:\r\n\r\n```\r\nDatabase Exception: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'plugins_handle_unq_idx'\r\nThe SQL being executed was: ALTER TABLE plugins ADD UNIQUE INDEX plugins_handle_unq_idx (handle)\r\n\r\nMigration: craft\\migrations\\m150403_184247_plugins_table_changes\r\n\r\nOutput:\r\n\r\n> create unique index plugins_handle_unq_idx on {{%plugins}} (handle) ...Exception: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'plugins_handle_unq_idx'\r\nThe SQL being executed was: ALTER TABLE plugins ADD UNIQUE INDEX plugins_handle_unq_idx (handle) (/var/www/proteus-iv/vendor/yiisoft/yii2/db/Schema.php:664)\r\n#0 /var/www/proteus-iv/vendor/yiisoft/yii2/db/Command.php(1263): yii\\db\\Schema->convertException(Object(PDOException), 'ALTER TABLE pl...')\r\n#1 /var/www/proteus-iv/vendor/yiisoft/yii2/db/Command.php(1075): yii\\db\\Command->internalExecute('ALTER TABLE pl...')\r\n#2 /var/www/proteus-iv/vendor/yiisoft/yii2/db/Migration.php(495): yii\\db\\Command->execute()\r\n#3 /var/www/proteus-iv/vendor/craftcms/cms/src/db/Migration.php(372): yii\\db\\Migration->createIndex('plugins_handle_...', '{{%plugins}}', Array, true)\r\n#4 /var/www/proteus-iv/vendor/craftcms/cms/src/migrations/m150403_184247_plugins_table_changes.php(42): craft\\db\\Migration->createIndex('plugins_handle_...', '{{%plugins}}', Array, true)\r\n#5 /var/www/proteus-iv/vendor/craftcms/cms/src/db/Migration.php(42): craft\\migrations\\m150403_184247_plugins_table_changes->safeUp()\r\n#6 /var/www/proteus-iv/vendor/craftcms/cms/src/db/MigrationManager.php(243): craft\\db\\Migration->up(true)\r\n#7 /var/www/proteus-iv/vendor/craftcms/cms/src/db/MigrationManager.php(163): craft\\db\\MigrationManager->migrateUp(Object(craft\\migrations\\m150403_184247_plugins_table_changes))\r\n#8 /var/www/proteus-iv/vendor/craftcms/cms/src/services/Updates.php(206): craft\\db\\MigrationManager->up()\r\n#9 /var/www/proteus-iv/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(435): craft\\services\\Updates->runMigrations(Array)\r\n#10 /var/www/proteus-iv/vendor/craftcms/cms/src/controllers/UpdaterController.php(207): craft\\controllers\\BaseUpdaterController->runMigrations(Array, 'restore-db')\r\n#11 [internal function]: craft\\controllers\\UpdaterController->actionMigrate()\r\n#12 /var/www/proteus-iv/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)\r\n#13 /var/www/proteus-iv/vendor/yiisoft/yii2/base/Controller.php(157): yii\\base\\InlineAction->runWithParams(Array)\r\n#14 /var/www/proteus-iv/vendor/craftcms/cms/src/web/Controller.php(76): yii\\base\\Controller->runAction('migrate', Array)\r\n#15 /var/www/proteus-iv/vendor/yiisoft/yii2/base/Module.php(528): craft\\web\\Controller->runAction('migrate', Array)\r\n#16 /var/www/proteus-iv/vendor/craftcms/cms/src/web/Application.php(272): yii\\base\\Module->runAction('updater/migrate', Array)\r\n#17 /var/www/proteus-iv/vendor/craftcms/cms/src/web/Application.php(625): craft\\web\\Application->runAction('updater/migrate')\r\n#18 /var/www/proteus-iv/vendor/craftcms/cms/src/web/Application.php(203): craft\\web\\Application->_processUpdateLogic(Object(craft\\web\\Request))\r\n#19 /var/www/proteus-iv/vendor/yiisoft/yii2/base/Application.php(386): craft\\web\\Application->handleRequest(Object(craft\\web\\Request))\r\n#20 /var/www/proteus-iv/web/index.php(21): yii\\base\\Application->run()\r\n#21 {main}\r\n```\r\n\r\n\r\n### Additional info\r\n\r\n- Craft version: update from 3.0.3.1 to 3.0.4\r\n- PHP version: 7.2.4\r\n- Database: MariaDB 10.2.14\r\n- PDO Driver for MySQL: mysqlnd 5.0.12"},"comment":{"url":"https://api.github.com/repos/craftcms/cms/issues/comments/386623919","html_url":"https://github.com/craftcms/cms/issues/2807#issuecomment-386623919","issue_url":"https://api.github.com/repos/craftcms/cms/issues/2807","id":386623919,"user":{"login":"MrGlasspoole","id":2067170,"avatar_url":"https://avatars1.githubusercontent.com/u/2067170?v=4","gravatar_id":"","url":"https://api.github.com/users/MrGlasspoole","html_url":"https://github.com/MrGlasspoole","followers_url":"https://api.github.com/users/MrGlasspoole/followers","following_url":"https://api.github.com/users/MrGlasspoole/following{/other_user}","gists_url":"https://api.github.com/users/MrGlasspoole/gists{/gist_id}","starred_url":"https://api.github.com/users/MrGlasspoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrGlasspoole/subscriptions","organizations_url":"https://api.github.com/users/MrGlasspoole/orgs","repos_url":"https://api.github.com/users/MrGlasspoole/repos","events_url":"https://api.github.com/users/MrGlasspoole/events{/privacy}","received_events_url":"https://api.github.com/users/MrGlasspoole/received_events","type":"User","site_admin":false},"created_at":"2018-05-04T14:44:22Z","updated_at":"2018-05-04T14:44:22Z","author_association":"NONE","body":"Thanks now it works.\r\nThere was a m180418_205713_widget_cleanup row and i deleted it and then the update worked.\r\nIs there something i need to do to make sure everything is ok (integrity check)?"}}
{"actor":{"display_login":"MrGlasspoole"}}