{"action":"created","comment":{"url":"https://api.github.com/repos/GovLab/noi2/pulls/comments/40091473","id":40091473,"diff_hunk":"@@ -0,0 +1,40 @@\n+\"\"\"empty message\n+\n+Revision ID: 4da21f1d702a\n+Revises: 1a45abbc3682\n+Create Date: 2015-09-21 23:19:45.737008\n+\n+\"\"\"\n+\n+# revision identifiers, used by Alembic.\n+revision = '4da21f1d702a'\n+down_revision = '1a45abbc3682'\n+\n+from alembic import op\n+import sqlalchemy as sa\n+\n+\n+def upgrade():\n+    ### commands auto generated by Alembic - please adjust! ###\n+    op.create_unique_constraint(None, 'role_users', ['user_id', 'role_id'])\n+    op.create_unique_constraint(None, 'user_expertise_domains', ['user_id', 'name'])\n+    op.create_unique_constraint(None, 'user_languages', ['user_id', 'locale'])\n+    op.create_unique_constraint(None, 'user_skills', ['user_id', 'name'])\n+    op.alter_column('users', 'deployment',\n+               existing_type=sa.VARCHAR(),\n+               nullable=False)","path":"migrations/versions/4da21f1d702a_.py","position":25,"original_position":25,"commit_id":"97dde2f9c39a27da1e2044e87133a709bda4f4dc","original_commit_id":"97dde2f9c39a27da1e2044e87133a709bda4f4dc","user":{"login":"toolness","id":124687,"avatar_url":"https://avatars.githubusercontent.com/u/124687?v=3","gravatar_id":"","url":"https://api.github.com/users/toolness","html_url":"https://github.com/toolness","followers_url":"https://api.github.com/users/toolness/followers","following_url":"https://api.github.com/users/toolness/following{/other_user}","gists_url":"https://api.github.com/users/toolness/gists{/gist_id}","starred_url":"https://api.github.com/users/toolness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolness/subscriptions","organizations_url":"https://api.github.com/users/toolness/orgs","repos_url":"https://api.github.com/users/toolness/repos","events_url":"https://api.github.com/users/toolness/events{/privacy}","received_events_url":"https://api.github.com/users/toolness/received_events","type":"User","site_admin":false},"body":"Er, isn't line 26 enforcing that? I'm not sure why alembic's auto-generated migrations put it after everything else, but it does appear to be in there, unless I'm misinterpreting you.","created_at":"2015-09-22T14:20:10Z","updated_at":"2015-09-22T14:20:10Z","html_url":"https://github.com/GovLab/noi2/pull/26#discussion_r40091473","pull_request_url":"https://api.github.com/repos/GovLab/noi2/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/GovLab/noi2/pulls/comments/40091473"},"html":{"href":"https://github.com/GovLab/noi2/pull/26#discussion_r40091473"},"pull_request":{"href":"https://api.github.com/repos/GovLab/noi2/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/GovLab/noi2/pulls/26","id":45612630,"html_url":"https://github.com/GovLab/noi2/pull/26","diff_url":"https://github.com/GovLab/noi2/pull/26.diff","patch_url":"https://github.com/GovLab/noi2/pull/26.patch","issue_url":"https://api.github.com/repos/GovLab/noi2/issues/26","number":26,"state":"open","locked":false,"title":"Enforce unique constraints on models.","user":{"login":"toolness","id":124687,"avatar_url":"https://avatars.githubusercontent.com/u/124687?v=3","gravatar_id":"","url":"https://api.github.com/users/toolness","html_url":"https://github.com/toolness","followers_url":"https://api.github.com/users/toolness/followers","following_url":"https://api.github.com/users/toolness/following{/other_user}","gists_url":"https://api.github.com/users/toolness/gists{/gist_id}","starred_url":"https://api.github.com/users/toolness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolness/subscriptions","organizations_url":"https://api.github.com/users/toolness/orgs","repos_url":"https://api.github.com/users/toolness/repos","events_url":"https://api.github.com/users/toolness/events{/privacy}","received_events_url":"https://api.github.com/users/toolness/received_events","type":"User","site_admin":false},"body":"This fixes #21.\r\n","created_at":"2015-09-21T23:23:51Z","updated_at":"2015-09-22T14:20:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27c359d6496e338616054408e77abae03d89f5ac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GovLab/noi2/pulls/26/commits","review_comments_url":"https://api.github.com/repos/GovLab/noi2/pulls/26/comments","review_comment_url":"https://api.github.com/repos/GovLab/noi2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GovLab/noi2/issues/26/comments","statuses_url":"https://api.github.com/repos/GovLab/noi2/statuses/97dde2f9c39a27da1e2044e87133a709bda4f4dc","head":{"label":"GovLab:fix-constraints","ref":"fix-constraints","sha":"97dde2f9c39a27da1e2044e87133a709bda4f4dc","user":{"login":"GovLab","id":4174904,"avatar_url":"https://avatars.githubusercontent.com/u/4174904?v=3","gravatar_id":"","url":"https://api.github.com/users/GovLab","html_url":"https://github.com/GovLab","followers_url":"https://api.github.com/users/GovLab/followers","following_url":"https://api.github.com/users/GovLab/following{/other_user}","gists_url":"https://api.github.com/users/GovLab/gists{/gist_id}","starred_url":"https://api.github.com/users/GovLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovLab/subscriptions","organizations_url":"https://api.github.com/users/GovLab/orgs","repos_url":"https://api.github.com/users/GovLab/repos","events_url":"https://api.github.com/users/GovLab/events{/privacy}","received_events_url":"https://api.github.com/users/GovLab/received_events","type":"Organization","site_admin":false},"repo":{"id":40134662,"name":"noi2","full_name":"GovLab/noi2","owner":{"login":"GovLab","id":4174904,"avatar_url":"https://avatars.githubusercontent.com/u/4174904?v=3","gravatar_id":"","url":"https://api.github.com/users/GovLab","html_url":"https://github.com/GovLab","followers_url":"https://api.github.com/users/GovLab/followers","following_url":"https://api.github.com/users/GovLab/following{/other_user}","gists_url":"https://api.github.com/users/GovLab/gists{/gist_id}","starred_url":"https://api.github.com/users/GovLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovLab/subscriptions","organizations_url":"https://api.github.com/users/GovLab/orgs","repos_url":"https://api.github.com/users/GovLab/repos","events_url":"https://api.github.com/users/GovLab/events{/privacy}","received_events_url":"https://api.github.com/users/GovLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GovLab/noi2","description":"","fork":false,"url":"https://api.github.com/repos/GovLab/noi2","forks_url":"https://api.github.com/repos/GovLab/noi2/forks","keys_url":"https://api.github.com/repos/GovLab/noi2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GovLab/noi2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GovLab/noi2/teams","hooks_url":"https://api.github.com/repos/GovLab/noi2/hooks","issue_events_url":"https://api.github.com/repos/GovLab/noi2/issues/events{/number}","events_url":"https://api.github.com/repos/GovLab/noi2/events","assignees_url":"https://api.github.com/repos/GovLab/noi2/assignees{/user}","branches_url":"https://api.github.com/repos/GovLab/noi2/branches{/branch}","tags_url":"https://api.github.com/repos/GovLab/noi2/tags","blobs_url":"https://api.github.com/repos/GovLab/noi2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GovLab/noi2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GovLab/noi2/git/refs{/sha}","trees_url":"https://api.github.com/repos/GovLab/noi2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GovLab/noi2/statuses/{sha}","languages_url":"https://api.github.com/repos/GovLab/noi2/languages","stargazers_url":"https://api.github.com/repos/GovLab/noi2/stargazers","contributors_url":"https://api.github.com/repos/GovLab/noi2/contributors","subscribers_url":"https://api.github.com/repos/GovLab/noi2/subscribers","subscription_url":"https://api.github.com/repos/GovLab/noi2/subscription","commits_url":"https://api.github.com/repos/GovLab/noi2/commits{/sha}","git_commits_url":"https://api.github.com/repos/GovLab/noi2/git/commits{/sha}","comments_url":"https://api.github.com/repos/GovLab/noi2/comments{/number}","issue_comment_url":"https://api.github.com/repos/GovLab/noi2/issues/comments{/number}","contents_url":"https://api.github.com/repos/GovLab/noi2/contents/{+path}","compare_url":"https://api.github.com/repos/GovLab/noi2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GovLab/noi2/merges","archive_url":"https://api.github.com/repos/GovLab/noi2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GovLab/noi2/downloads","issues_url":"https://api.github.com/repos/GovLab/noi2/issues{/number}","pulls_url":"https://api.github.com/repos/GovLab/noi2/pulls{/number}","milestones_url":"https://api.github.com/repos/GovLab/noi2/milestones{/number}","notifications_url":"https://api.github.com/repos/GovLab/noi2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GovLab/noi2/labels{/name}","releases_url":"https://api.github.com/repos/GovLab/noi2/releases{/id}","created_at":"2015-08-03T16:10:41Z","updated_at":"2015-08-04T18:48:38Z","pushed_at":"2015-09-21T23:23:52Z","git_url":"git://github.com/GovLab/noi2.git","ssh_url":"git@github.com:GovLab/noi2.git","clone_url":"https://github.com/GovLab/noi2.git","svn_url":"https://github.com/GovLab/noi2","homepage":null,"size":4079,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"GovLab:master","ref":"master","sha":"6e8233eaa530a34ec126d3b6409d3c4d49fe8765","user":{"login":"GovLab","id":4174904,"avatar_url":"https://avatars.githubusercontent.com/u/4174904?v=3","gravatar_id":"","url":"https://api.github.com/users/GovLab","html_url":"https://github.com/GovLab","followers_url":"https://api.github.com/users/GovLab/followers","following_url":"https://api.github.com/users/GovLab/following{/other_user}","gists_url":"https://api.github.com/users/GovLab/gists{/gist_id}","starred_url":"https://api.github.com/users/GovLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovLab/subscriptions","organizations_url":"https://api.github.com/users/GovLab/orgs","repos_url":"https://api.github.com/users/GovLab/repos","events_url":"https://api.github.com/users/GovLab/events{/privacy}","received_events_url":"https://api.github.com/users/GovLab/received_events","type":"Organization","site_admin":false},"repo":{"id":40134662,"name":"noi2","full_name":"GovLab/noi2","owner":{"login":"GovLab","id":4174904,"avatar_url":"https://avatars.githubusercontent.com/u/4174904?v=3","gravatar_id":"","url":"https://api.github.com/users/GovLab","html_url":"https://github.com/GovLab","followers_url":"https://api.github.com/users/GovLab/followers","following_url":"https://api.github.com/users/GovLab/following{/other_user}","gists_url":"https://api.github.com/users/GovLab/gists{/gist_id}","starred_url":"https://api.github.com/users/GovLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GovLab/subscriptions","organizations_url":"https://api.github.com/users/GovLab/orgs","repos_url":"https://api.github.com/users/GovLab/repos","events_url":"https://api.github.com/users/GovLab/events{/privacy}","received_events_url":"https://api.github.com/users/GovLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GovLab/noi2","description":"","fork":false,"url":"https://api.github.com/repos/GovLab/noi2","forks_url":"https://api.github.com/repos/GovLab/noi2/forks","keys_url":"https://api.github.com/repos/GovLab/noi2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GovLab/noi2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GovLab/noi2/teams","hooks_url":"https://api.github.com/repos/GovLab/noi2/hooks","issue_events_url":"https://api.github.com/repos/GovLab/noi2/issues/events{/number}","events_url":"https://api.github.com/repos/GovLab/noi2/events","assignees_url":"https://api.github.com/repos/GovLab/noi2/assignees{/user}","branches_url":"https://api.github.com/repos/GovLab/noi2/branches{/branch}","tags_url":"https://api.github.com/repos/GovLab/noi2/tags","blobs_url":"https://api.github.com/repos/GovLab/noi2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GovLab/noi2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GovLab/noi2/git/refs{/sha}","trees_url":"https://api.github.com/repos/GovLab/noi2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GovLab/noi2/statuses/{sha}","languages_url":"https://api.github.com/repos/GovLab/noi2/languages","stargazers_url":"https://api.github.com/repos/GovLab/noi2/stargazers","contributors_url":"https://api.github.com/repos/GovLab/noi2/contributors","subscribers_url":"https://api.github.com/repos/GovLab/noi2/subscribers","subscription_url":"https://api.github.com/repos/GovLab/noi2/subscription","commits_url":"https://api.github.com/repos/GovLab/noi2/commits{/sha}","git_commits_url":"https://api.github.com/repos/GovLab/noi2/git/commits{/sha}","comments_url":"https://api.github.com/repos/GovLab/noi2/comments{/number}","issue_comment_url":"https://api.github.com/repos/GovLab/noi2/issues/comments{/number}","contents_url":"https://api.github.com/repos/GovLab/noi2/contents/{+path}","compare_url":"https://api.github.com/repos/GovLab/noi2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GovLab/noi2/merges","archive_url":"https://api.github.com/repos/GovLab/noi2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GovLab/noi2/downloads","issues_url":"https://api.github.com/repos/GovLab/noi2/issues{/number}","pulls_url":"https://api.github.com/repos/GovLab/noi2/pulls{/number}","milestones_url":"https://api.github.com/repos/GovLab/noi2/milestones{/number}","notifications_url":"https://api.github.com/repos/GovLab/noi2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GovLab/noi2/labels{/name}","releases_url":"https://api.github.com/repos/GovLab/noi2/releases{/id}","created_at":"2015-08-03T16:10:41Z","updated_at":"2015-08-04T18:48:38Z","pushed_at":"2015-09-21T23:23:52Z","git_url":"git://github.com/GovLab/noi2.git","ssh_url":"git@github.com:GovLab/noi2.git","clone_url":"https://github.com/GovLab/noi2.git","svn_url":"https://github.com/GovLab/noi2","homepage":null,"size":4079,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GovLab/noi2/pulls/26"},"html":{"href":"https://github.com/GovLab/noi2/pull/26"},"issue":{"href":"https://api.github.com/repos/GovLab/noi2/issues/26"},"comments":{"href":"https://api.github.com/repos/GovLab/noi2/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/GovLab/noi2/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/GovLab/noi2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GovLab/noi2/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/GovLab/noi2/statuses/97dde2f9c39a27da1e2044e87133a709bda4f4dc"}}}}