{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6526","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6526/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6526/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6526/events","html_url":"https://github.com/cakephp/cakephp/issues/6526","id":74748522,"number":6526,"title":"Fixture generation broken with length defined","user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/40","html_url":"https://github.com/cakephp/cakephp/milestones/3.0.5","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/40/labels","id":1101248,"number":40,"title":"3.0.5","description":"Bugfixes and optimizations for 3.0.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":8,"state":"open","created_at":"2015-05-08T01:49:40Z","updated_at":"2015-05-09T20:08:27Z","due_on":"2015-05-24T04:00:00Z","closed_at":null},"comments":2,"created_at":"2015-05-09T20:08:27Z","updated_at":"2015-05-09T20:52:08Z","closed_at":null,"body":"But baked or not, the following should not make SQLite error:\r\n\r\n    public $fields = [\r\n        'id' => ['type' => 'integer', 'length' => 10],\r\n\r\nThe error thrown:\r\n```\r\nWarning Error: Fixture creation for \"sandbox_animals\" failed \"SQLSTATE[HY000]: G\r\neneral error: 1 AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\" in\r\n[...\\vendor\\cakephp\\cakephp\\src\\TestSuite\\Fixture\\TestFixture.php, line 233]\r\n\r\nException: Unable to insert fixtures for \"Sandbox\\Test\\TestCase\\Controller\\Boots\r\ntrapControllerTest\" test case. SQLSTATE[HY000]: General error: 1 no such table:\r\nsandbox_animals in \r\n[...\\vendor\\cakephp\\cakephp\\src\\TestSuite\\Fixture\\FixtureManager.php, line 254]\r\n```\r\n\r\nRemoving the length makes it work again:\r\n\r\n    public $fields = [\r\n        'id' => ['type' => 'integer'],\r\n\r\n\r\nThe key difference is the (10) part, which SQLite doesnt seem to like.\r\n```\r\n//  working fixture\r\nINTEGER PRIMARY KEY AUTOINCREMENT\r\n\r\n// broken fixture\r\nINTEGER(10) PRIMARY KEY AUTOINCREMENT\r\n```\r\nWe should remove the length in the case of SQLite then."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/100544039","html_url":"https://github.com/cakephp/cakephp/issues/6526#issuecomment-100544039","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6526","id":100544039,"user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T20:52:07Z","updated_at":"2015-05-09T20:52:07Z","body":"Possible fix: https://github.com/cakephp/cakephp/compare/master-fixture\r\nMaybe there is a better solution, though?"}}