{"action":"closed","number":50,"pull_request":{"url":"https://api.github.com/repos/sethreno/schemazen/pulls/50","id":53123171,"html_url":"https://github.com/sethreno/schemazen/pull/50","diff_url":"https://github.com/sethreno/schemazen/pull/50.diff","patch_url":"https://github.com/sethreno/schemazen/pull/50.patch","issue_url":"https://api.github.com/repos/sethreno/schemazen/issues/50","number":50,"state":"closed","locked":false,"title":"\"Instead of\" trigger on a view causes exception","user":{"login":"danbrad","id":367304,"avatar_url":"https://avatars.githubusercontent.com/u/367304?v=3","gravatar_id":"","url":"https://api.github.com/users/danbrad","html_url":"https://github.com/danbrad","followers_url":"https://api.github.com/users/danbrad/followers","following_url":"https://api.github.com/users/danbrad/following{/other_user}","gists_url":"https://api.github.com/users/danbrad/gists{/gist_id}","starred_url":"https://api.github.com/users/danbrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbrad/subscriptions","organizations_url":"https://api.github.com/users/danbrad/orgs","repos_url":"https://api.github.com/users/danbrad/repos","events_url":"https://api.github.com/users/danbrad/events{/privacy}","received_events_url":"https://api.github.com/users/danbrad/received_events","type":"User","site_admin":false},"body":"SQL Server allows \"instead of\" triggers on views. Schemazen cannot handle this in v1.3.\r\n\r\nI have committed a red test in one commit so you can see the issue by running the tests.\r\n\r\nThe fix then brings the tests back to green. I have left joined sys.views in the query to get all triggers so that the table schema and table name are no longer null (but are the view schema and view name.)\r\n\r\nThis appears to work, but I am concerned that having the view name as the tablename might not be ideal\r\n\r\nHappy to attack from a different angle if you were to point me in the right direction.\r\n\r\nThanks!\r\n\r\nDan","created_at":"2015-12-09T14:12:16Z","updated_at":"2015-12-10T02:51:21Z","closed_at":"2015-12-10T02:51:21Z","merged_at":"2015-12-10T02:51:21Z","merge_commit_sha":"713fee4de69ef72eae1a85be01438d9deda4628c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sethreno/schemazen/pulls/50/commits","review_comments_url":"https://api.github.com/repos/sethreno/schemazen/pulls/50/comments","review_comment_url":"https://api.github.com/repos/sethreno/schemazen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sethreno/schemazen/issues/50/comments","statuses_url":"https://api.github.com/repos/sethreno/schemazen/statuses/0a90109436a296f51164d75483629aeb6f2e6c79","head":{"label":"danbrad:ViewInsteadOfTriggerScript","ref":"ViewInsteadOfTriggerScript","sha":"0a90109436a296f51164d75483629aeb6f2e6c79","user":{"login":"danbrad","id":367304,"avatar_url":"https://avatars.githubusercontent.com/u/367304?v=3","gravatar_id":"","url":"https://api.github.com/users/danbrad","html_url":"https://github.com/danbrad","followers_url":"https://api.github.com/users/danbrad/followers","following_url":"https://api.github.com/users/danbrad/following{/other_user}","gists_url":"https://api.github.com/users/danbrad/gists{/gist_id}","starred_url":"https://api.github.com/users/danbrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbrad/subscriptions","organizations_url":"https://api.github.com/users/danbrad/orgs","repos_url":"https://api.github.com/users/danbrad/repos","events_url":"https://api.github.com/users/danbrad/events{/privacy}","received_events_url":"https://api.github.com/users/danbrad/received_events","type":"User","site_admin":false},"repo":{"id":41143283,"name":"schemazen","full_name":"danbrad/schemazen","owner":{"login":"danbrad","id":367304,"avatar_url":"https://avatars.githubusercontent.com/u/367304?v=3","gravatar_id":"","url":"https://api.github.com/users/danbrad","html_url":"https://github.com/danbrad","followers_url":"https://api.github.com/users/danbrad/followers","following_url":"https://api.github.com/users/danbrad/following{/other_user}","gists_url":"https://api.github.com/users/danbrad/gists{/gist_id}","starred_url":"https://api.github.com/users/danbrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbrad/subscriptions","organizations_url":"https://api.github.com/users/danbrad/orgs","repos_url":"https://api.github.com/users/danbrad/repos","events_url":"https://api.github.com/users/danbrad/events{/privacy}","received_events_url":"https://api.github.com/users/danbrad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danbrad/schemazen","description":"Script and create SQL Server objects quickly","fork":true,"url":"https://api.github.com/repos/danbrad/schemazen","forks_url":"https://api.github.com/repos/danbrad/schemazen/forks","keys_url":"https://api.github.com/repos/danbrad/schemazen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danbrad/schemazen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danbrad/schemazen/teams","hooks_url":"https://api.github.com/repos/danbrad/schemazen/hooks","issue_events_url":"https://api.github.com/repos/danbrad/schemazen/issues/events{/number}","events_url":"https://api.github.com/repos/danbrad/schemazen/events","assignees_url":"https://api.github.com/repos/danbrad/schemazen/assignees{/user}","branches_url":"https://api.github.com/repos/danbrad/schemazen/branches{/branch}","tags_url":"https://api.github.com/repos/danbrad/schemazen/tags","blobs_url":"https://api.github.com/repos/danbrad/schemazen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danbrad/schemazen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danbrad/schemazen/git/refs{/sha}","trees_url":"https://api.github.com/repos/danbrad/schemazen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danbrad/schemazen/statuses/{sha}","languages_url":"https://api.github.com/repos/danbrad/schemazen/languages","stargazers_url":"https://api.github.com/repos/danbrad/schemazen/stargazers","contributors_url":"https://api.github.com/repos/danbrad/schemazen/contributors","subscribers_url":"https://api.github.com/repos/danbrad/schemazen/subscribers","subscription_url":"https://api.github.com/repos/danbrad/schemazen/subscription","commits_url":"https://api.github.com/repos/danbrad/schemazen/commits{/sha}","git_commits_url":"https://api.github.com/repos/danbrad/schemazen/git/commits{/sha}","comments_url":"https://api.github.com/repos/danbrad/schemazen/comments{/number}","issue_comment_url":"https://api.github.com/repos/danbrad/schemazen/issues/comments{/number}","contents_url":"https://api.github.com/repos/danbrad/schemazen/contents/{+path}","compare_url":"https://api.github.com/repos/danbrad/schemazen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danbrad/schemazen/merges","archive_url":"https://api.github.com/repos/danbrad/schemazen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danbrad/schemazen/downloads","issues_url":"https://api.github.com/repos/danbrad/schemazen/issues{/number}","pulls_url":"https://api.github.com/repos/danbrad/schemazen/pulls{/number}","milestones_url":"https://api.github.com/repos/danbrad/schemazen/milestones{/number}","notifications_url":"https://api.github.com/repos/danbrad/schemazen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danbrad/schemazen/labels{/name}","releases_url":"https://api.github.com/repos/danbrad/schemazen/releases{/id}","created_at":"2015-08-21T07:55:28Z","updated_at":"2015-08-21T07:55:28Z","pushed_at":"2015-12-09T21:42:40Z","git_url":"git://github.com/danbrad/schemazen.git","ssh_url":"git@github.com:danbrad/schemazen.git","clone_url":"https://github.com/danbrad/schemazen.git","svn_url":"https://github.com/danbrad/schemazen","homepage":"","size":872,"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":"sethreno:master","ref":"master","sha":"8ddec8d682ec6b9c78e031acb169e96efda39c2e","user":{"login":"sethreno","id":838365,"avatar_url":"https://avatars.githubusercontent.com/u/838365?v=3","gravatar_id":"","url":"https://api.github.com/users/sethreno","html_url":"https://github.com/sethreno","followers_url":"https://api.github.com/users/sethreno/followers","following_url":"https://api.github.com/users/sethreno/following{/other_user}","gists_url":"https://api.github.com/users/sethreno/gists{/gist_id}","starred_url":"https://api.github.com/users/sethreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethreno/subscriptions","organizations_url":"https://api.github.com/users/sethreno/orgs","repos_url":"https://api.github.com/users/sethreno/repos","events_url":"https://api.github.com/users/sethreno/events{/privacy}","received_events_url":"https://api.github.com/users/sethreno/received_events","type":"User","site_admin":false},"repo":{"id":8315399,"name":"schemazen","full_name":"sethreno/schemazen","owner":{"login":"sethreno","id":838365,"avatar_url":"https://avatars.githubusercontent.com/u/838365?v=3","gravatar_id":"","url":"https://api.github.com/users/sethreno","html_url":"https://github.com/sethreno","followers_url":"https://api.github.com/users/sethreno/followers","following_url":"https://api.github.com/users/sethreno/following{/other_user}","gists_url":"https://api.github.com/users/sethreno/gists{/gist_id}","starred_url":"https://api.github.com/users/sethreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethreno/subscriptions","organizations_url":"https://api.github.com/users/sethreno/orgs","repos_url":"https://api.github.com/users/sethreno/repos","events_url":"https://api.github.com/users/sethreno/events{/privacy}","received_events_url":"https://api.github.com/users/sethreno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sethreno/schemazen","description":"Script and create SQL Server objects quickly","fork":false,"url":"https://api.github.com/repos/sethreno/schemazen","forks_url":"https://api.github.com/repos/sethreno/schemazen/forks","keys_url":"https://api.github.com/repos/sethreno/schemazen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sethreno/schemazen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sethreno/schemazen/teams","hooks_url":"https://api.github.com/repos/sethreno/schemazen/hooks","issue_events_url":"https://api.github.com/repos/sethreno/schemazen/issues/events{/number}","events_url":"https://api.github.com/repos/sethreno/schemazen/events","assignees_url":"https://api.github.com/repos/sethreno/schemazen/assignees{/user}","branches_url":"https://api.github.com/repos/sethreno/schemazen/branches{/branch}","tags_url":"https://api.github.com/repos/sethreno/schemazen/tags","blobs_url":"https://api.github.com/repos/sethreno/schemazen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sethreno/schemazen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sethreno/schemazen/git/refs{/sha}","trees_url":"https://api.github.com/repos/sethreno/schemazen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sethreno/schemazen/statuses/{sha}","languages_url":"https://api.github.com/repos/sethreno/schemazen/languages","stargazers_url":"https://api.github.com/repos/sethreno/schemazen/stargazers","contributors_url":"https://api.github.com/repos/sethreno/schemazen/contributors","subscribers_url":"https://api.github.com/repos/sethreno/schemazen/subscribers","subscription_url":"https://api.github.com/repos/sethreno/schemazen/subscription","commits_url":"https://api.github.com/repos/sethreno/schemazen/commits{/sha}","git_commits_url":"https://api.github.com/repos/sethreno/schemazen/git/commits{/sha}","comments_url":"https://api.github.com/repos/sethreno/schemazen/comments{/number}","issue_comment_url":"https://api.github.com/repos/sethreno/schemazen/issues/comments{/number}","contents_url":"https://api.github.com/repos/sethreno/schemazen/contents/{+path}","compare_url":"https://api.github.com/repos/sethreno/schemazen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sethreno/schemazen/merges","archive_url":"https://api.github.com/repos/sethreno/schemazen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sethreno/schemazen/downloads","issues_url":"https://api.github.com/repos/sethreno/schemazen/issues{/number}","pulls_url":"https://api.github.com/repos/sethreno/schemazen/pulls{/number}","milestones_url":"https://api.github.com/repos/sethreno/schemazen/milestones{/number}","notifications_url":"https://api.github.com/repos/sethreno/schemazen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sethreno/schemazen/labels{/name}","releases_url":"https://api.github.com/repos/sethreno/schemazen/releases{/id}","created_at":"2013-02-20T15:05:09Z","updated_at":"2015-12-09T16:23:32Z","pushed_at":"2015-12-10T02:51:21Z","git_url":"git://github.com/sethreno/schemazen.git","ssh_url":"git@github.com:sethreno/schemazen.git","clone_url":"https://github.com/sethreno/schemazen.git","svn_url":"https://github.com/sethreno/schemazen","homepage":"","size":1084,"stargazers_count":44,"watchers_count":44,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":10,"forks":20,"open_issues":10,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sethreno/schemazen/pulls/50"},"html":{"href":"https://github.com/sethreno/schemazen/pull/50"},"issue":{"href":"https://api.github.com/repos/sethreno/schemazen/issues/50"},"comments":{"href":"https://api.github.com/repos/sethreno/schemazen/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/sethreno/schemazen/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/sethreno/schemazen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sethreno/schemazen/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/sethreno/schemazen/statuses/0a90109436a296f51164d75483629aeb6f2e6c79"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"sethreno","id":838365,"avatar_url":"https://avatars.githubusercontent.com/u/838365?v=3","gravatar_id":"","url":"https://api.github.com/users/sethreno","html_url":"https://github.com/sethreno","followers_url":"https://api.github.com/users/sethreno/followers","following_url":"https://api.github.com/users/sethreno/following{/other_user}","gists_url":"https://api.github.com/users/sethreno/gists{/gist_id}","starred_url":"https://api.github.com/users/sethreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethreno/subscriptions","organizations_url":"https://api.github.com/users/sethreno/orgs","repos_url":"https://api.github.com/users/sethreno/repos","events_url":"https://api.github.com/users/sethreno/events{/privacy}","received_events_url":"https://api.github.com/users/sethreno/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":2,"additions":53,"deletions":2,"changed_files":2}}