{"action":"created","issue":{"url":"https://api.github.com/repos/HE-Arc/lenspector/issues/57","repository_url":"https://api.github.com/repos/HE-Arc/lenspector","labels_url":"https://api.github.com/repos/HE-Arc/lenspector/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/HE-Arc/lenspector/issues/57/comments","events_url":"https://api.github.com/repos/HE-Arc/lenspector/issues/57/events","html_url":"https://github.com/HE-Arc/lenspector/issues/57","id":191971087,"number":57,"title":"Seeding fails","user":{"login":"greut","id":1388,"avatar_url":"https://avatars.githubusercontent.com/u/1388?v=3","gravatar_id":"","url":"https://api.github.com/users/greut","html_url":"https://github.com/greut","followers_url":"https://api.github.com/users/greut/followers","following_url":"https://api.github.com/users/greut/following{/other_user}","gists_url":"https://api.github.com/users/greut/gists{/gist_id}","starred_url":"https://api.github.com/users/greut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greut/subscriptions","organizations_url":"https://api.github.com/users/greut/orgs","repos_url":"https://api.github.com/users/greut/repos","events_url":"https://api.github.com/users/greut/events{/privacy}","received_events_url":"https://api.github.com/users/greut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-28T10:36:33Z","updated_at":"2016-12-05T12:56:12Z","closed_at":null,"body":"```\r\n$ php artisan migrate --seed\r\n**************************************\r\n*     Application In Production!     *\r\n**************************************\r\n\r\n Do you really wish to run this command? (yes/no) [no]:\r\n > yes\r\n\r\nMigration table created successfully.\r\nMigrated: 2014_10_12_000000_create_users_table\r\nMigrated: 2014_10_12_100000_create_password_resets_table\r\nMigrated: 2016_10_26_135938_create_product_table\r\nMigrated: 2016_11_02_120731_create_products_type\r\nMigrated: 2016_11_02_143430_create_update_lense_status\r\nSeeded: UsersTableSeeder\r\nSeeded: InventoryStatusTableSeeder\r\nSeeded: ProductTypesTableSeeder\r\n\r\n                                                                                                                    \r\n  [Illuminate\\Database\\QueryException]                                                                              \r\n  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint  \r\n   fails (`forge`.`lense`, CONSTRAINT `lense_id_foreign` FOREIGN KEY (`id`) REFERENCES `inventory_status` (`id`))   \r\n  (SQL: insert into `lense` (`sn`, `dateExpiration`, `exclude`, `productId`, `sphCorrected`, `status`, `updated_at  \r\n  `, `created_at`) values (F00000005, 2018-06-21, 0, 2, 7.5, 2, 2016-11-28 10:27:27, 2016-11-28 10:27:27))          \r\n                                                                                                                    \r\n\r\n                                                                                                                    \r\n  [PDOException]                                                                                                    \r\n  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint  \r\n   fails (`forge`.`lense`, CONSTRAINT `lense_id_foreign` FOREIGN KEY (`id`) REFERENCES `inventory_status` (`id`))   \r\n                                                                                                                    \r\n```\r\n\r\n```sql\r\nCREATE TABLE `inventory_status` (\r\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,\r\n  PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\r\n\r\n CREATE TABLE `lense` (\r\n  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n  `sn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,\r\n  `dateExpiration` date NOT NULL,\r\n  `exclude` tinyint(4) NOT NULL DEFAULT '0',\r\n  `productId` int(10) unsigned DEFAULT NULL,\r\n  `SphCorrected` double unsigned NOT NULL,\r\n  `created_at` timestamp NULL DEFAULT NULL,\r\n  `updated_at` timestamp NULL DEFAULT NULL,\r\n  `status` int(11) NOT NULL,\r\n  PRIMARY KEY (`id`),\r\n  KEY `lense_productid_foreign` (`productId`),\r\n  CONSTRAINT `lense_id_foreign` FOREIGN KEY (`id`) REFERENCES `inventory_status` (`id`),\r\n  CONSTRAINT `lense_productid_foreign` FOREIGN KEY (`productId`) REFERENCES `product` (`id`)\r\n) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\r\n```\r\n\r\nPS: avez-vous de bonnes raisons pour ne pas utiliser `utf8mb4` ?\r\nhttps://mathiasbynens.be/notes/mysql-utf8mb4"},"comment":{"url":"https://api.github.com/repos/HE-Arc/lenspector/issues/comments/264847305","html_url":"https://github.com/HE-Arc/lenspector/issues/57#issuecomment-264847305","issue_url":"https://api.github.com/repos/HE-Arc/lenspector/issues/57","id":264847305,"user":{"login":"greut","id":1388,"avatar_url":"https://avatars.githubusercontent.com/u/1388?v=3","gravatar_id":"","url":"https://api.github.com/users/greut","html_url":"https://github.com/greut","followers_url":"https://api.github.com/users/greut/followers","following_url":"https://api.github.com/users/greut/following{/other_user}","gists_url":"https://api.github.com/users/greut/gists{/gist_id}","starred_url":"https://api.github.com/users/greut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greut/subscriptions","organizations_url":"https://api.github.com/users/greut/orgs","repos_url":"https://api.github.com/users/greut/repos","events_url":"https://api.github.com/users/greut/events{/privacy}","received_events_url":"https://api.github.com/users/greut/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T12:56:12Z","updated_at":"2016-12-05T12:56:12Z","body":"> Donc ce qui vous gêne c'est que le colonne status dans lense soit nullable alors qu'elle référence le champ id dans la table inventory_status?\r\n\r\nAucunement, je répondais à la question d'@axelroy mais je me suis peut-être emmêler les pinceaux entre les lignes vertes et rouges. ça semble être bon."}}
{"actor":{"display_login":"greut"}}