{"action":"opened","number":4,"pull_request":{"url":"https://api.github.com/repos/grnet/djnro/pulls/4","id":47485091,"html_url":"https://github.com/grnet/djnro/pull/4","diff_url":"https://github.com/grnet/djnro/pull/4.diff","patch_url":"https://github.com/grnet/djnro/pull/4.patch","issue_url":"https://api.github.com/repos/grnet/djnro/issues/4","number":4,"state":"open","locked":false,"title":"South migrations: add PostgreSQL issue workaround","user":{"login":"vladimir-mencl-eresearch","id":740558,"avatar_url":"https://avatars.githubusercontent.com/u/740558?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-mencl-eresearch","html_url":"https://github.com/vladimir-mencl-eresearch","followers_url":"https://api.github.com/users/vladimir-mencl-eresearch/followers","following_url":"https://api.github.com/users/vladimir-mencl-eresearch/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-mencl-eresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-mencl-eresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-mencl-eresearch/subscriptions","organizations_url":"https://api.github.com/users/vladimir-mencl-eresearch/orgs","repos_url":"https://api.github.com/users/vladimir-mencl-eresearch/repos","events_url":"https://api.github.com/users/vladimir-mencl-eresearch/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-mencl-eresearch/received_events","type":"User","site_admin":false},"body":"Add workaround for an issue with running South Migrations on PostgreSQL.\r\n\r\nMigration 0022_auto__chg_field_institutiondetails_number_id__del_field_instrealmmon_i.py breaks on PostgreSQL with:\r\n\r\nERROR:  column \"realm_id\" cannot be cast automatically to type integer\r\nHINT:  Specify a USING expression to perform the conversion.\r\nSTATEMENT:  ALTER TABLE \"edumanage_instrealmmon\" ALTER COLUMN \"realm_id\" TYPE integer,\r\n            ALTER COLUMN \"realm_id\" SET NOT NULL, ALTER COLUMN \"realm_id\" DROP DEFAULT;\r\nThis is a known problem: http://south.aeracode.org/ticket/484\r\n(PostgreSQL will not automatically convert and conversion must be provided with the USING clause)\r\nWorkaround: For PostgreSQL invoke a direct SQL statement amended with a USING clause to do the converion explicitly.\r\n\r\nRely on db._get_connection().vendor to determine if we are running on PostgreSQL.\r\n\r\nCredits:\r\n* Workaround via db.execute:\r\n  http://codeinthehole.com/writing/altering-postgres-table-columns-with-south/\r\n* USING syntax to convert integers:\r\n  http://stackoverflow.com/questions/13170570/change-type-of-varchar-field-to-integer-cannot-be-cast-automatically-to-type-i","created_at":"2015-10-13T02:34:25Z","updated_at":"2015-10-13T02:34:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/grnet/djnro/pulls/4/commits","review_comments_url":"https://api.github.com/repos/grnet/djnro/pulls/4/comments","review_comment_url":"https://api.github.com/repos/grnet/djnro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grnet/djnro/issues/4/comments","statuses_url":"https://api.github.com/repos/grnet/djnro/statuses/9a2924d5c58908091f7bafeaf8195b3a71da8016","head":{"label":"REANNZ:dev-fix-migrations","ref":"dev-fix-migrations","sha":"9a2924d5c58908091f7bafeaf8195b3a71da8016","user":{"login":"REANNZ","id":4230818,"avatar_url":"https://avatars.githubusercontent.com/u/4230818?v=3","gravatar_id":"","url":"https://api.github.com/users/REANNZ","html_url":"https://github.com/REANNZ","followers_url":"https://api.github.com/users/REANNZ/followers","following_url":"https://api.github.com/users/REANNZ/following{/other_user}","gists_url":"https://api.github.com/users/REANNZ/gists{/gist_id}","starred_url":"https://api.github.com/users/REANNZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/REANNZ/subscriptions","organizations_url":"https://api.github.com/users/REANNZ/orgs","repos_url":"https://api.github.com/users/REANNZ/repos","events_url":"https://api.github.com/users/REANNZ/events{/privacy}","received_events_url":"https://api.github.com/users/REANNZ/received_events","type":"Organization","site_admin":false},"repo":{"id":15663040,"name":"djnro","full_name":"REANNZ/djnro","owner":{"login":"REANNZ","id":4230818,"avatar_url":"https://avatars.githubusercontent.com/u/4230818?v=3","gravatar_id":"","url":"https://api.github.com/users/REANNZ","html_url":"https://github.com/REANNZ","followers_url":"https://api.github.com/users/REANNZ/followers","following_url":"https://api.github.com/users/REANNZ/following{/other_user}","gists_url":"https://api.github.com/users/REANNZ/gists{/gist_id}","starred_url":"https://api.github.com/users/REANNZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/REANNZ/subscriptions","organizations_url":"https://api.github.com/users/REANNZ/orgs","repos_url":"https://api.github.com/users/REANNZ/repos","events_url":"https://api.github.com/users/REANNZ/events{/privacy}","received_events_url":"https://api.github.com/users/REANNZ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/REANNZ/djnro","description":"DjNRO hits the decks of eduroam db mgmgt!","fork":true,"url":"https://api.github.com/repos/REANNZ/djnro","forks_url":"https://api.github.com/repos/REANNZ/djnro/forks","keys_url":"https://api.github.com/repos/REANNZ/djnro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/REANNZ/djnro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/REANNZ/djnro/teams","hooks_url":"https://api.github.com/repos/REANNZ/djnro/hooks","issue_events_url":"https://api.github.com/repos/REANNZ/djnro/issues/events{/number}","events_url":"https://api.github.com/repos/REANNZ/djnro/events","assignees_url":"https://api.github.com/repos/REANNZ/djnro/assignees{/user}","branches_url":"https://api.github.com/repos/REANNZ/djnro/branches{/branch}","tags_url":"https://api.github.com/repos/REANNZ/djnro/tags","blobs_url":"https://api.github.com/repos/REANNZ/djnro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/REANNZ/djnro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/REANNZ/djnro/git/refs{/sha}","trees_url":"https://api.github.com/repos/REANNZ/djnro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/REANNZ/djnro/statuses/{sha}","languages_url":"https://api.github.com/repos/REANNZ/djnro/languages","stargazers_url":"https://api.github.com/repos/REANNZ/djnro/stargazers","contributors_url":"https://api.github.com/repos/REANNZ/djnro/contributors","subscribers_url":"https://api.github.com/repos/REANNZ/djnro/subscribers","subscription_url":"https://api.github.com/repos/REANNZ/djnro/subscription","commits_url":"https://api.github.com/repos/REANNZ/djnro/commits{/sha}","git_commits_url":"https://api.github.com/repos/REANNZ/djnro/git/commits{/sha}","comments_url":"https://api.github.com/repos/REANNZ/djnro/comments{/number}","issue_comment_url":"https://api.github.com/repos/REANNZ/djnro/issues/comments{/number}","contents_url":"https://api.github.com/repos/REANNZ/djnro/contents/{+path}","compare_url":"https://api.github.com/repos/REANNZ/djnro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/REANNZ/djnro/merges","archive_url":"https://api.github.com/repos/REANNZ/djnro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/REANNZ/djnro/downloads","issues_url":"https://api.github.com/repos/REANNZ/djnro/issues{/number}","pulls_url":"https://api.github.com/repos/REANNZ/djnro/pulls{/number}","milestones_url":"https://api.github.com/repos/REANNZ/djnro/milestones{/number}","notifications_url":"https://api.github.com/repos/REANNZ/djnro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/REANNZ/djnro/labels{/name}","releases_url":"https://api.github.com/repos/REANNZ/djnro/releases{/id}","created_at":"2014-01-06T02:13:28Z","updated_at":"2014-09-26T09:49:23Z","pushed_at":"2015-10-13T02:33:42Z","git_url":"git://github.com/REANNZ/djnro.git","ssh_url":"git@github.com:REANNZ/djnro.git","clone_url":"https://github.com/REANNZ/djnro.git","svn_url":"https://github.com/REANNZ/djnro","homepage":null,"size":4682,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grnet:master","ref":"master","sha":"94864f05dedf68afe812e8d5584316992e1412ec","user":{"login":"grnet","id":1745890,"avatar_url":"https://avatars.githubusercontent.com/u/1745890?v=3","gravatar_id":"","url":"https://api.github.com/users/grnet","html_url":"https://github.com/grnet","followers_url":"https://api.github.com/users/grnet/followers","following_url":"https://api.github.com/users/grnet/following{/other_user}","gists_url":"https://api.github.com/users/grnet/gists{/gist_id}","starred_url":"https://api.github.com/users/grnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grnet/subscriptions","organizations_url":"https://api.github.com/users/grnet/orgs","repos_url":"https://api.github.com/users/grnet/repos","events_url":"https://api.github.com/users/grnet/events{/privacy}","received_events_url":"https://api.github.com/users/grnet/received_events","type":"Organization","site_admin":false},"repo":{"id":8288004,"name":"djnro","full_name":"grnet/djnro","owner":{"login":"grnet","id":1745890,"avatar_url":"https://avatars.githubusercontent.com/u/1745890?v=3","gravatar_id":"","url":"https://api.github.com/users/grnet","html_url":"https://github.com/grnet","followers_url":"https://api.github.com/users/grnet/followers","following_url":"https://api.github.com/users/grnet/following{/other_user}","gists_url":"https://api.github.com/users/grnet/gists{/gist_id}","starred_url":"https://api.github.com/users/grnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grnet/subscriptions","organizations_url":"https://api.github.com/users/grnet/orgs","repos_url":"https://api.github.com/users/grnet/repos","events_url":"https://api.github.com/users/grnet/events{/privacy}","received_events_url":"https://api.github.com/users/grnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grnet/djnro","description":"DjNRO hits the decks of eduroam db mgmgt!","fork":false,"url":"https://api.github.com/repos/grnet/djnro","forks_url":"https://api.github.com/repos/grnet/djnro/forks","keys_url":"https://api.github.com/repos/grnet/djnro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grnet/djnro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grnet/djnro/teams","hooks_url":"https://api.github.com/repos/grnet/djnro/hooks","issue_events_url":"https://api.github.com/repos/grnet/djnro/issues/events{/number}","events_url":"https://api.github.com/repos/grnet/djnro/events","assignees_url":"https://api.github.com/repos/grnet/djnro/assignees{/user}","branches_url":"https://api.github.com/repos/grnet/djnro/branches{/branch}","tags_url":"https://api.github.com/repos/grnet/djnro/tags","blobs_url":"https://api.github.com/repos/grnet/djnro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grnet/djnro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grnet/djnro/git/refs{/sha}","trees_url":"https://api.github.com/repos/grnet/djnro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grnet/djnro/statuses/{sha}","languages_url":"https://api.github.com/repos/grnet/djnro/languages","stargazers_url":"https://api.github.com/repos/grnet/djnro/stargazers","contributors_url":"https://api.github.com/repos/grnet/djnro/contributors","subscribers_url":"https://api.github.com/repos/grnet/djnro/subscribers","subscription_url":"https://api.github.com/repos/grnet/djnro/subscription","commits_url":"https://api.github.com/repos/grnet/djnro/commits{/sha}","git_commits_url":"https://api.github.com/repos/grnet/djnro/git/commits{/sha}","comments_url":"https://api.github.com/repos/grnet/djnro/comments{/number}","issue_comment_url":"https://api.github.com/repos/grnet/djnro/issues/comments{/number}","contents_url":"https://api.github.com/repos/grnet/djnro/contents/{+path}","compare_url":"https://api.github.com/repos/grnet/djnro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grnet/djnro/merges","archive_url":"https://api.github.com/repos/grnet/djnro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grnet/djnro/downloads","issues_url":"https://api.github.com/repos/grnet/djnro/issues{/number}","pulls_url":"https://api.github.com/repos/grnet/djnro/pulls{/number}","milestones_url":"https://api.github.com/repos/grnet/djnro/milestones{/number}","notifications_url":"https://api.github.com/repos/grnet/djnro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grnet/djnro/labels{/name}","releases_url":"https://api.github.com/repos/grnet/djnro/releases{/id}","created_at":"2013-02-19T10:25:25Z","updated_at":"2014-10-06T13:17:20Z","pushed_at":"2015-10-12T06:03:47Z","git_url":"git://github.com/grnet/djnro.git","ssh_url":"git@github.com:grnet/djnro.git","clone_url":"https://github.com/grnet/djnro.git","svn_url":"https://github.com/grnet/djnro","homepage":"http://djnro.grnet.gr/","size":5081,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grnet/djnro/pulls/4"},"html":{"href":"https://github.com/grnet/djnro/pull/4"},"issue":{"href":"https://api.github.com/repos/grnet/djnro/issues/4"},"comments":{"href":"https://api.github.com/repos/grnet/djnro/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/grnet/djnro/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/grnet/djnro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grnet/djnro/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/grnet/djnro/statuses/9a2924d5c58908091f7bafeaf8195b3a71da8016"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":16,"deletions":1,"changed_files":1}}