{"action":"created","issue":{"url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/issues/601","repository_url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser","labels_url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/issues/601/labels{/name}","comments_url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/issues/601/comments","events_url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/issues/601/events","html_url":"https://github.com/sqlitebrowser/sqlitebrowser/issues/601","id":156145161,"number":601,"title":"Insert record fails with foreign key constraint","user":{"login":"mtissington","id":6769116,"avatar_url":"https://avatars.githubusercontent.com/u/6769116?v=3","gravatar_id":"","url":"https://api.github.com/users/mtissington","html_url":"https://github.com/mtissington","followers_url":"https://api.github.com/users/mtissington/followers","following_url":"https://api.github.com/users/mtissington/following{/other_user}","gists_url":"https://api.github.com/users/mtissington/gists{/gist_id}","starred_url":"https://api.github.com/users/mtissington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtissington/subscriptions","organizations_url":"https://api.github.com/users/mtissington/orgs","repos_url":"https://api.github.com/users/mtissington/repos","events_url":"https://api.github.com/users/mtissington/events{/privacy}","received_events_url":"https://api.github.com/users/mtissington/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/labels/constraints%20&%20foreign%20keys","name":"constraints & foreign keys","color":"006b75"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/milestones/11","html_url":"https://github.com/sqlitebrowser/sqlitebrowser/milestones/3.10.0%20-%20A%20Rubber%20Cactus%20Has%20Many%20Uses","labels_url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/milestones/11/labels","id":1727245,"number":11,"title":"3.10.0 - A Rubber Cactus Has Many Uses","description":"","creator":{"login":"justinclift","id":406299,"avatar_url":"https://avatars.githubusercontent.com/u/406299?v=3","gravatar_id":"","url":"https://api.github.com/users/justinclift","html_url":"https://github.com/justinclift","followers_url":"https://api.github.com/users/justinclift/followers","following_url":"https://api.github.com/users/justinclift/following{/other_user}","gists_url":"https://api.github.com/users/justinclift/gists{/gist_id}","starred_url":"https://api.github.com/users/justinclift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinclift/subscriptions","organizations_url":"https://api.github.com/users/justinclift/orgs","repos_url":"https://api.github.com/users/justinclift/repos","events_url":"https://api.github.com/users/justinclift/events{/privacy}","received_events_url":"https://api.github.com/users/justinclift/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":4,"state":"open","created_at":"2016-04-24T12:26:18Z","updated_at":"2016-09-06T21:59:57Z","due_on":"2016-10-01T00:00:00Z","closed_at":null},"comments":14,"created_at":"2016-05-22T10:14:49Z","updated_at":"2016-09-07T11:42:22Z","closed_at":null,"body":"I have the following schema .. when I click the add record button, I get an error that it failed with foreign key constraint - \r\n\r\nWhy does the add record need to do a real INSERT before I have had a chance to edit the row?\r\n(that's what the sql log is showing) ... this will never work.\r\n\r\n```swift\r\nBEGIN TRANSACTION;\r\nCREATE TABLE \"words\" (\r\n\t`groupid`\tINTEGER NOT NULL DEFAULT 1,\r\n\t`word`\tTEXT NOT NULL,\r\n\t`action`\tTEXT NOT NULL,\r\n\tPRIMARY KEY(groupid,word),\r\n\tFOREIGN KEY(`groupid`) REFERENCES `groups`(`groupid`) ON DELETE CASCADE\r\n);\r\nCREATE TABLE \"groups\" (\r\n\t`groupid`\tINTEGER NOT NULL,\r\n\t`name`\tTEXT NOT NULL,\r\n\t`description`\tTEXT,\r\n\t`enabled`\tINTEGER NOT NULL DEFAULT 1,\r\n\t`canedit`\tINTEGER NOT NULL DEFAULT 1,\r\n\tPRIMARY KEY(groupid)\r\n);\r\nCOMMIT;`"},"comment":{"url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/issues/comments/245255108","html_url":"https://github.com/sqlitebrowser/sqlitebrowser/issues/601#issuecomment-245255108","issue_url":"https://api.github.com/repos/sqlitebrowser/sqlitebrowser/issues/601","id":245255108,"user":{"login":"Novo55","id":9299894,"avatar_url":"https://avatars.githubusercontent.com/u/9299894?v=3","gravatar_id":"","url":"https://api.github.com/users/Novo55","html_url":"https://github.com/Novo55","followers_url":"https://api.github.com/users/Novo55/followers","following_url":"https://api.github.com/users/Novo55/following{/other_user}","gists_url":"https://api.github.com/users/Novo55/gists{/gist_id}","starred_url":"https://api.github.com/users/Novo55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Novo55/subscriptions","organizations_url":"https://api.github.com/users/Novo55/orgs","repos_url":"https://api.github.com/users/Novo55/repos","events_url":"https://api.github.com/users/Novo55/events{/privacy}","received_events_url":"https://api.github.com/users/Novo55/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T11:42:22Z","updated_at":"2016-09-07T11:42:22Z","body":"Hi Justin,\n\nI just tried the database again and got the same error.\n\nkeep on trying :-),  I’ll give it a try in a few days.\n\nregards\n\n\nSteve W\nsteve_w@exemail.com.au\n\n\n\nOn 7 Sep 2016, at 5:36 am, Justin Clift <notifications@github.com> wrote:\n\n> @Jeff-G As a thought, would you be ok to try today's nightly build? @MKleusberg was fixing some of the constraint stuff last week, and it should be in better shape now.\n> \n> Note the \"today's build\" wording though. We added some experimental code this afternoon, which could break tonight's automatic nightly build (we're testing some things out). There may not be a good nightly build from tomorrow onwards for a few days... 😉\n> \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n\n"}}
{"actor":{"display_login":"Novo55"}}