{"action":"created","comment":{"url":"https://api.github.com/repos/aodn/aatams/pulls/comments/58961622","id":58961622,"diff_hunk":"@@ -0,0 +1,70 @@\n+﻿set search_path = aatams, public;\n+\n+begin;\n+\n+-- 1. Clean up animal_release table by deleting animal_release records with no corresponding surgery\n+DELETE FROM animal_release ar\n+WHERE NOT EXISTS (SELECT release_id FROM surgery s WHERE s.release_id = ar.id);","path":"scripts/sql/xavier-changes-2016_April/aatamsDB_queries_#268.sql","position":7,"original_position":7,"commit_id":"c60405fd61cf85170e7f0aff6712c2240ef430bb","original_commit_id":"e64d683117452ab08057bf13ce3d194700540fa0","user":{"login":"julian1","id":4312379,"avatar_url":"https://avatars.githubusercontent.com/u/4312379?v=3","gravatar_id":"","url":"https://api.github.com/users/julian1","html_url":"https://github.com/julian1","followers_url":"https://api.github.com/users/julian1/followers","following_url":"https://api.github.com/users/julian1/following{/other_user}","gists_url":"https://api.github.com/users/julian1/gists{/gist_id}","starred_url":"https://api.github.com/users/julian1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julian1/subscriptions","organizations_url":"https://api.github.com/users/julian1/orgs","repos_url":"https://api.github.com/users/julian1/repos","events_url":"https://api.github.com/users/julian1/events{/privacy}","received_events_url":"https://api.github.com/users/julian1/received_events","type":"User","site_admin":false},"body":"Under the current application design, there is no way to roll back these types of changes. If we get something wrong, then the original (meta)data is unrecoverable and there is no way unwind to the previous state and reapply change. Are @astecken and @smancini still happy to proceed understanding this caveat?","created_at":"2016-04-07T23:28:07Z","updated_at":"2016-04-07T23:28:07Z","html_url":"https://github.com/aodn/aatams/pull/304#discussion_r58961622","pull_request_url":"https://api.github.com/repos/aodn/aatams/pulls/304","_links":{"self":{"href":"https://api.github.com/repos/aodn/aatams/pulls/comments/58961622"},"html":{"href":"https://github.com/aodn/aatams/pull/304#discussion_r58961622"},"pull_request":{"href":"https://api.github.com/repos/aodn/aatams/pulls/304"}}},"pull_request":{"url":"https://api.github.com/repos/aodn/aatams/pulls/304","id":65709999,"html_url":"https://github.com/aodn/aatams/pull/304","diff_url":"https://github.com/aodn/aatams/pull/304.diff","patch_url":"https://github.com/aodn/aatams/pull/304.patch","issue_url":"https://api.github.com/repos/aodn/aatams/issues/304","number":304,"state":"open","locked":false,"title":"Moved #219 script into April folder, and added script to fix #268","user":{"login":"xhoenner","id":3443821,"avatar_url":"https://avatars.githubusercontent.com/u/3443821?v=3","gravatar_id":"","url":"https://api.github.com/users/xhoenner","html_url":"https://github.com/xhoenner","followers_url":"https://api.github.com/users/xhoenner/followers","following_url":"https://api.github.com/users/xhoenner/following{/other_user}","gists_url":"https://api.github.com/users/xhoenner/gists{/gist_id}","starred_url":"https://api.github.com/users/xhoenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xhoenner/subscriptions","organizations_url":"https://api.github.com/users/xhoenner/orgs","repos_url":"https://api.github.com/users/xhoenner/repos","events_url":"https://api.github.com/users/xhoenner/events{/privacy}","received_events_url":"https://api.github.com/users/xhoenner/received_events","type":"User","site_admin":false},"body":"After having fixed the GUI side of things (https://github.com/aodn/aatams/commit/bb4f4da3af822790cc24e279d8f1b8db16ffbe8a), this PR addresses the remaining invalid content and we'll therefore be able to close https://github.com/aodn/aatams/issues/268.","created_at":"2016-04-07T22:25:25Z","updated_at":"2016-04-07T23:28:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bcae608907f5fbd2db57ff65cf5750febf1ffe4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aodn/aatams/pulls/304/commits","review_comments_url":"https://api.github.com/repos/aodn/aatams/pulls/304/comments","review_comment_url":"https://api.github.com/repos/aodn/aatams/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aodn/aatams/issues/304/comments","statuses_url":"https://api.github.com/repos/aodn/aatams/statuses/c60405fd61cf85170e7f0aff6712c2240ef430bb","head":{"label":"aodn:fix268","ref":"fix268","sha":"c60405fd61cf85170e7f0aff6712c2240ef430bb","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":10501618,"name":"aatams","full_name":"aodn/aatams","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/aatams","description":"","fork":false,"url":"https://api.github.com/repos/aodn/aatams","forks_url":"https://api.github.com/repos/aodn/aatams/forks","keys_url":"https://api.github.com/repos/aodn/aatams/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/aatams/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/aatams/teams","hooks_url":"https://api.github.com/repos/aodn/aatams/hooks","issue_events_url":"https://api.github.com/repos/aodn/aatams/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/aatams/events","assignees_url":"https://api.github.com/repos/aodn/aatams/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/aatams/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/aatams/tags","blobs_url":"https://api.github.com/repos/aodn/aatams/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/aatams/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/aatams/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/aatams/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/aatams/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/aatams/languages","stargazers_url":"https://api.github.com/repos/aodn/aatams/stargazers","contributors_url":"https://api.github.com/repos/aodn/aatams/contributors","subscribers_url":"https://api.github.com/repos/aodn/aatams/subscribers","subscription_url":"https://api.github.com/repos/aodn/aatams/subscription","commits_url":"https://api.github.com/repos/aodn/aatams/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/aatams/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/aatams/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/aatams/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/aatams/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/aatams/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/aatams/merges","archive_url":"https://api.github.com/repos/aodn/aatams/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/aatams/downloads","issues_url":"https://api.github.com/repos/aodn/aatams/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/aatams/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/aatams/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/aatams/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/aatams/labels{/name}","releases_url":"https://api.github.com/repos/aodn/aatams/releases{/id}","deployments_url":"https://api.github.com/repos/aodn/aatams/deployments","created_at":"2013-06-05T12:04:53Z","updated_at":"2016-03-21T03:36:39Z","pushed_at":"2016-04-07T23:15:25Z","git_url":"git://github.com/aodn/aatams.git","ssh_url":"git@github.com:aodn/aatams.git","clone_url":"https://github.com/aodn/aatams.git","svn_url":"https://github.com/aodn/aatams","homepage":"https://aatams.emii.org.au","size":303593,"stargazers_count":1,"watchers_count":1,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":37,"forks":1,"open_issues":37,"watchers":1,"default_branch":"master"}},"base":{"label":"aodn:master","ref":"master","sha":"3d79979d1c009469aea35854e31d6e192ac950b2","user":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"repo":{"id":10501618,"name":"aatams","full_name":"aodn/aatams","owner":{"login":"aodn","id":2802166,"avatar_url":"https://avatars.githubusercontent.com/u/2802166?v=3","gravatar_id":"","url":"https://api.github.com/users/aodn","html_url":"https://github.com/aodn","followers_url":"https://api.github.com/users/aodn/followers","following_url":"https://api.github.com/users/aodn/following{/other_user}","gists_url":"https://api.github.com/users/aodn/gists{/gist_id}","starred_url":"https://api.github.com/users/aodn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aodn/subscriptions","organizations_url":"https://api.github.com/users/aodn/orgs","repos_url":"https://api.github.com/users/aodn/repos","events_url":"https://api.github.com/users/aodn/events{/privacy}","received_events_url":"https://api.github.com/users/aodn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aodn/aatams","description":"","fork":false,"url":"https://api.github.com/repos/aodn/aatams","forks_url":"https://api.github.com/repos/aodn/aatams/forks","keys_url":"https://api.github.com/repos/aodn/aatams/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aodn/aatams/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aodn/aatams/teams","hooks_url":"https://api.github.com/repos/aodn/aatams/hooks","issue_events_url":"https://api.github.com/repos/aodn/aatams/issues/events{/number}","events_url":"https://api.github.com/repos/aodn/aatams/events","assignees_url":"https://api.github.com/repos/aodn/aatams/assignees{/user}","branches_url":"https://api.github.com/repos/aodn/aatams/branches{/branch}","tags_url":"https://api.github.com/repos/aodn/aatams/tags","blobs_url":"https://api.github.com/repos/aodn/aatams/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aodn/aatams/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aodn/aatams/git/refs{/sha}","trees_url":"https://api.github.com/repos/aodn/aatams/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aodn/aatams/statuses/{sha}","languages_url":"https://api.github.com/repos/aodn/aatams/languages","stargazers_url":"https://api.github.com/repos/aodn/aatams/stargazers","contributors_url":"https://api.github.com/repos/aodn/aatams/contributors","subscribers_url":"https://api.github.com/repos/aodn/aatams/subscribers","subscription_url":"https://api.github.com/repos/aodn/aatams/subscription","commits_url":"https://api.github.com/repos/aodn/aatams/commits{/sha}","git_commits_url":"https://api.github.com/repos/aodn/aatams/git/commits{/sha}","comments_url":"https://api.github.com/repos/aodn/aatams/comments{/number}","issue_comment_url":"https://api.github.com/repos/aodn/aatams/issues/comments{/number}","contents_url":"https://api.github.com/repos/aodn/aatams/contents/{+path}","compare_url":"https://api.github.com/repos/aodn/aatams/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aodn/aatams/merges","archive_url":"https://api.github.com/repos/aodn/aatams/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aodn/aatams/downloads","issues_url":"https://api.github.com/repos/aodn/aatams/issues{/number}","pulls_url":"https://api.github.com/repos/aodn/aatams/pulls{/number}","milestones_url":"https://api.github.com/repos/aodn/aatams/milestones{/number}","notifications_url":"https://api.github.com/repos/aodn/aatams/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aodn/aatams/labels{/name}","releases_url":"https://api.github.com/repos/aodn/aatams/releases{/id}","deployments_url":"https://api.github.com/repos/aodn/aatams/deployments","created_at":"2013-06-05T12:04:53Z","updated_at":"2016-03-21T03:36:39Z","pushed_at":"2016-04-07T23:15:25Z","git_url":"git://github.com/aodn/aatams.git","ssh_url":"git@github.com:aodn/aatams.git","clone_url":"https://github.com/aodn/aatams.git","svn_url":"https://github.com/aodn/aatams","homepage":"https://aatams.emii.org.au","size":303593,"stargazers_count":1,"watchers_count":1,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":37,"forks":1,"open_issues":37,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aodn/aatams/pulls/304"},"html":{"href":"https://github.com/aodn/aatams/pull/304"},"issue":{"href":"https://api.github.com/repos/aodn/aatams/issues/304"},"comments":{"href":"https://api.github.com/repos/aodn/aatams/issues/304/comments"},"review_comments":{"href":"https://api.github.com/repos/aodn/aatams/pulls/304/comments"},"review_comment":{"href":"https://api.github.com/repos/aodn/aatams/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aodn/aatams/pulls/304/commits"},"statuses":{"href":"https://api.github.com/repos/aodn/aatams/statuses/c60405fd61cf85170e7f0aff6712c2240ef430bb"}}}}