{"action":"opened","number":581,"pull_request":{"url":"https://api.github.com/repos/yesodweb/persistent/pulls/581","id":73965161,"html_url":"https://github.com/yesodweb/persistent/pull/581","diff_url":"https://github.com/yesodweb/persistent/pull/581.diff","patch_url":"https://github.com/yesodweb/persistent/pull/581.patch","issue_url":"https://api.github.com/repos/yesodweb/persistent/issues/581","number":581,"state":"open","locked":false,"title":"Support FKs to non-int PK entities","user":{"login":"pseudonom","id":5056117,"avatar_url":"https://avatars.githubusercontent.com/u/5056117?v=3","gravatar_id":"","url":"https://api.github.com/users/pseudonom","html_url":"https://github.com/pseudonom","followers_url":"https://api.github.com/users/pseudonom/followers","following_url":"https://api.github.com/users/pseudonom/following{/other_user}","gists_url":"https://api.github.com/users/pseudonom/gists{/gist_id}","starred_url":"https://api.github.com/users/pseudonom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pseudonom/subscriptions","organizations_url":"https://api.github.com/users/pseudonom/orgs","repos_url":"https://api.github.com/users/pseudonom/repos","events_url":"https://api.github.com/users/pseudonom/events{/privacy}","received_events_url":"https://api.github.com/users/pseudonom/received_events","type":"User","site_admin":false},"body":"Currently, a declaration like\r\n\r\n```haskell\r\n\r\nimport ClassPrelude.Yesod\r\nimport Data.UUID (UUID)\r\n\r\nshare [mkPersist sqlSettings, mkMigrate \"migrateAll\"] [persistLowerCase|\r\n  Foo\r\n    Id UUID\r\n  Bar\r\n    fooId FooId\r\n|]\r\n```\r\nwill produce bad entity definitions. e.g. The migration will fail with\r\n\r\n```\r\nSqlError {sqlState = \"42804\", sqlExecStatus = FatalError, sqlErrorMsg = \"foreign key constraint \\\"bar_foo_id_fkey\\\" cannot be implemented\", sqlErrorDetail = \"Key columns \\\"foo_id\\\" and \\\"id\\\" are of incompatible types: bigint and uuid.\", sqlErrorHint = \"\"}\r\n```.\r\n\r\nThis patch is is currently in the \"works for me\" stage, though it's pretty ugly. We have to do the fixing at the last minute because otherwise we end up referring to `FooId` before it's been defined.","created_at":"2016-06-15T18:59:31Z","updated_at":"2016-06-15T18:59:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b16c750f0979b8cf39a9cd3ac44044827004b6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yesodweb/persistent/pulls/581/commits","review_comments_url":"https://api.github.com/repos/yesodweb/persistent/pulls/581/comments","review_comment_url":"https://api.github.com/repos/yesodweb/persistent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yesodweb/persistent/issues/581/comments","statuses_url":"https://api.github.com/repos/yesodweb/persistent/statuses/36d57175ec813c2410af4f597b877dc26a0cec66","head":{"label":"pseudonom:master","ref":"master","sha":"36d57175ec813c2410af4f597b877dc26a0cec66","user":{"login":"pseudonom","id":5056117,"avatar_url":"https://avatars.githubusercontent.com/u/5056117?v=3","gravatar_id":"","url":"https://api.github.com/users/pseudonom","html_url":"https://github.com/pseudonom","followers_url":"https://api.github.com/users/pseudonom/followers","following_url":"https://api.github.com/users/pseudonom/following{/other_user}","gists_url":"https://api.github.com/users/pseudonom/gists{/gist_id}","starred_url":"https://api.github.com/users/pseudonom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pseudonom/subscriptions","organizations_url":"https://api.github.com/users/pseudonom/orgs","repos_url":"https://api.github.com/users/pseudonom/repos","events_url":"https://api.github.com/users/pseudonom/events{/privacy}","received_events_url":"https://api.github.com/users/pseudonom/received_events","type":"User","site_admin":false},"repo":{"id":51184495,"name":"persistent","full_name":"pseudonom/persistent","owner":{"login":"pseudonom","id":5056117,"avatar_url":"https://avatars.githubusercontent.com/u/5056117?v=3","gravatar_id":"","url":"https://api.github.com/users/pseudonom","html_url":"https://github.com/pseudonom","followers_url":"https://api.github.com/users/pseudonom/followers","following_url":"https://api.github.com/users/pseudonom/following{/other_user}","gists_url":"https://api.github.com/users/pseudonom/gists{/gist_id}","starred_url":"https://api.github.com/users/pseudonom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pseudonom/subscriptions","organizations_url":"https://api.github.com/users/pseudonom/orgs","repos_url":"https://api.github.com/users/pseudonom/repos","events_url":"https://api.github.com/users/pseudonom/events{/privacy}","received_events_url":"https://api.github.com/users/pseudonom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pseudonom/persistent","description":"Fork to split read and write DB. Waiting on upstream.","fork":true,"url":"https://api.github.com/repos/pseudonom/persistent","forks_url":"https://api.github.com/repos/pseudonom/persistent/forks","keys_url":"https://api.github.com/repos/pseudonom/persistent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pseudonom/persistent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pseudonom/persistent/teams","hooks_url":"https://api.github.com/repos/pseudonom/persistent/hooks","issue_events_url":"https://api.github.com/repos/pseudonom/persistent/issues/events{/number}","events_url":"https://api.github.com/repos/pseudonom/persistent/events","assignees_url":"https://api.github.com/repos/pseudonom/persistent/assignees{/user}","branches_url":"https://api.github.com/repos/pseudonom/persistent/branches{/branch}","tags_url":"https://api.github.com/repos/pseudonom/persistent/tags","blobs_url":"https://api.github.com/repos/pseudonom/persistent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pseudonom/persistent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pseudonom/persistent/git/refs{/sha}","trees_url":"https://api.github.com/repos/pseudonom/persistent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pseudonom/persistent/statuses/{sha}","languages_url":"https://api.github.com/repos/pseudonom/persistent/languages","stargazers_url":"https://api.github.com/repos/pseudonom/persistent/stargazers","contributors_url":"https://api.github.com/repos/pseudonom/persistent/contributors","subscribers_url":"https://api.github.com/repos/pseudonom/persistent/subscribers","subscription_url":"https://api.github.com/repos/pseudonom/persistent/subscription","commits_url":"https://api.github.com/repos/pseudonom/persistent/commits{/sha}","git_commits_url":"https://api.github.com/repos/pseudonom/persistent/git/commits{/sha}","comments_url":"https://api.github.com/repos/pseudonom/persistent/comments{/number}","issue_comment_url":"https://api.github.com/repos/pseudonom/persistent/issues/comments{/number}","contents_url":"https://api.github.com/repos/pseudonom/persistent/contents/{+path}","compare_url":"https://api.github.com/repos/pseudonom/persistent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pseudonom/persistent/merges","archive_url":"https://api.github.com/repos/pseudonom/persistent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pseudonom/persistent/downloads","issues_url":"https://api.github.com/repos/pseudonom/persistent/issues{/number}","pulls_url":"https://api.github.com/repos/pseudonom/persistent/pulls{/number}","milestones_url":"https://api.github.com/repos/pseudonom/persistent/milestones{/number}","notifications_url":"https://api.github.com/repos/pseudonom/persistent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pseudonom/persistent/labels{/name}","releases_url":"https://api.github.com/repos/pseudonom/persistent/releases{/id}","deployments_url":"https://api.github.com/repos/pseudonom/persistent/deployments","created_at":"2016-02-06T01:28:54Z","updated_at":"2016-03-21T19:05:37Z","pushed_at":"2016-06-15T18:56:11Z","git_url":"git://github.com/pseudonom/persistent.git","ssh_url":"git@github.com:pseudonom/persistent.git","clone_url":"https://github.com/pseudonom/persistent.git","svn_url":"https://github.com/pseudonom/persistent","homepage":"","size":9412,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yesodweb:master","ref":"master","sha":"452ca0bf2a5aa83250bf4236f663efaa4aa37045","user":{"login":"yesodweb","id":930379,"avatar_url":"https://avatars.githubusercontent.com/u/930379?v=3","gravatar_id":"","url":"https://api.github.com/users/yesodweb","html_url":"https://github.com/yesodweb","followers_url":"https://api.github.com/users/yesodweb/followers","following_url":"https://api.github.com/users/yesodweb/following{/other_user}","gists_url":"https://api.github.com/users/yesodweb/gists{/gist_id}","starred_url":"https://api.github.com/users/yesodweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesodweb/subscriptions","organizations_url":"https://api.github.com/users/yesodweb/orgs","repos_url":"https://api.github.com/users/yesodweb/repos","events_url":"https://api.github.com/users/yesodweb/events{/privacy}","received_events_url":"https://api.github.com/users/yesodweb/received_events","type":"Organization","site_admin":false},"repo":{"id":570503,"name":"persistent","full_name":"yesodweb/persistent","owner":{"login":"yesodweb","id":930379,"avatar_url":"https://avatars.githubusercontent.com/u/930379?v=3","gravatar_id":"","url":"https://api.github.com/users/yesodweb","html_url":"https://github.com/yesodweb","followers_url":"https://api.github.com/users/yesodweb/followers","following_url":"https://api.github.com/users/yesodweb/following{/other_user}","gists_url":"https://api.github.com/users/yesodweb/gists{/gist_id}","starred_url":"https://api.github.com/users/yesodweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesodweb/subscriptions","organizations_url":"https://api.github.com/users/yesodweb/orgs","repos_url":"https://api.github.com/users/yesodweb/repos","events_url":"https://api.github.com/users/yesodweb/events{/privacy}","received_events_url":"https://api.github.com/users/yesodweb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yesodweb/persistent","description":"Persistence interface for Haskell allowing multiple storage methods.","fork":false,"url":"https://api.github.com/repos/yesodweb/persistent","forks_url":"https://api.github.com/repos/yesodweb/persistent/forks","keys_url":"https://api.github.com/repos/yesodweb/persistent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yesodweb/persistent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yesodweb/persistent/teams","hooks_url":"https://api.github.com/repos/yesodweb/persistent/hooks","issue_events_url":"https://api.github.com/repos/yesodweb/persistent/issues/events{/number}","events_url":"https://api.github.com/repos/yesodweb/persistent/events","assignees_url":"https://api.github.com/repos/yesodweb/persistent/assignees{/user}","branches_url":"https://api.github.com/repos/yesodweb/persistent/branches{/branch}","tags_url":"https://api.github.com/repos/yesodweb/persistent/tags","blobs_url":"https://api.github.com/repos/yesodweb/persistent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yesodweb/persistent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yesodweb/persistent/git/refs{/sha}","trees_url":"https://api.github.com/repos/yesodweb/persistent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yesodweb/persistent/statuses/{sha}","languages_url":"https://api.github.com/repos/yesodweb/persistent/languages","stargazers_url":"https://api.github.com/repos/yesodweb/persistent/stargazers","contributors_url":"https://api.github.com/repos/yesodweb/persistent/contributors","subscribers_url":"https://api.github.com/repos/yesodweb/persistent/subscribers","subscription_url":"https://api.github.com/repos/yesodweb/persistent/subscription","commits_url":"https://api.github.com/repos/yesodweb/persistent/commits{/sha}","git_commits_url":"https://api.github.com/repos/yesodweb/persistent/git/commits{/sha}","comments_url":"https://api.github.com/repos/yesodweb/persistent/comments{/number}","issue_comment_url":"https://api.github.com/repos/yesodweb/persistent/issues/comments{/number}","contents_url":"https://api.github.com/repos/yesodweb/persistent/contents/{+path}","compare_url":"https://api.github.com/repos/yesodweb/persistent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yesodweb/persistent/merges","archive_url":"https://api.github.com/repos/yesodweb/persistent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yesodweb/persistent/downloads","issues_url":"https://api.github.com/repos/yesodweb/persistent/issues{/number}","pulls_url":"https://api.github.com/repos/yesodweb/persistent/pulls{/number}","milestones_url":"https://api.github.com/repos/yesodweb/persistent/milestones{/number}","notifications_url":"https://api.github.com/repos/yesodweb/persistent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yesodweb/persistent/labels{/name}","releases_url":"https://api.github.com/repos/yesodweb/persistent/releases{/id}","deployments_url":"https://api.github.com/repos/yesodweb/persistent/deployments","created_at":"2010-03-19T20:44:30Z","updated_at":"2016-06-03T05:27:30Z","pushed_at":"2016-06-15T18:59:32Z","git_url":"git://github.com/yesodweb/persistent.git","ssh_url":"git@github.com:yesodweb/persistent.git","clone_url":"https://github.com/yesodweb/persistent.git","svn_url":"https://github.com/yesodweb/persistent","homepage":"","size":9966,"stargazers_count":175,"watchers_count":175,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":124,"mirror_url":null,"open_issues_count":58,"forks":124,"open_issues":58,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yesodweb/persistent/pulls/581"},"html":{"href":"https://github.com/yesodweb/persistent/pull/581"},"issue":{"href":"https://api.github.com/repos/yesodweb/persistent/issues/581"},"comments":{"href":"https://api.github.com/repos/yesodweb/persistent/issues/581/comments"},"review_comments":{"href":"https://api.github.com/repos/yesodweb/persistent/pulls/581/comments"},"review_comment":{"href":"https://api.github.com/repos/yesodweb/persistent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yesodweb/persistent/pulls/581/commits"},"statuses":{"href":"https://api.github.com/repos/yesodweb/persistent/statuses/36d57175ec813c2410af4f597b877dc26a0cec66"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":37,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"pseudonom"}}