{"action":"opened","number":435,"pull_request":{"url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/435","id":55564266,"html_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/435","diff_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/435.diff","patch_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/435.patch","issue_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/435","number":435,"state":"open","locked":false,"title":"Correct SQL syntax error when creating temporary table","user":{"login":"wconrad","id":1935752,"avatar_url":"https://avatars.githubusercontent.com/u/1935752?v=3","gravatar_id":"","url":"https://api.github.com/users/wconrad","html_url":"https://github.com/wconrad","followers_url":"https://api.github.com/users/wconrad/followers","following_url":"https://api.github.com/users/wconrad/following{/other_user}","gists_url":"https://api.github.com/users/wconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/wconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wconrad/subscriptions","organizations_url":"https://api.github.com/users/wconrad/orgs","repos_url":"https://api.github.com/users/wconrad/repos","events_url":"https://api.github.com/users/wconrad/events{/privacy}","received_events_url":"https://api.github.com/users/wconrad/received_events","type":"User","site_admin":false},"body":"When creating a temporary table, this code:\r\n\r\n    connection.create_table(\"foo\", :temporary => true)\r\n\r\ncauses invalid SQL to be issued to SqlServer:\r\n\r\n```\r\nActiveRecord::StatementInvalid: TinyTds::Error: Unknown object type 'TEMPORARY' used in a CREATE, DROP, or ALTER statement.: CREATE TEMPORARY TABLE [sst_temp_table] ([id] int NOT NULL IDENTITY(1,1) PRIMARY KEY)\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:300:in `do'\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:300:in `raw_connection_do'\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:253:in `block in do_execute'\r\n    /home/wayne/.rvm/gems/ruby-2.2.2/bundler/gems/rails-104468f026e2/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:472:in `block in log'\r\n    /home/wayne/.rvm/gems/ruby-2.2.2/bundler/gems/rails-104468f026e2/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n    /home/wayne/.rvm/gems/ruby-2.2.2/bundler/gems/rails-104468f026e2/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `log'\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:253:in `do_execute'\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/database_statements.rb:14:in `execute'\r\n    /home/wayne/.rvm/gems/ruby-2.2.2/bundler/gems/rails-104468f026e2/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:in `create_table'\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver/schema_statements.rb:21:in `create_table'\r\n    /home/wayne/aux/activerecord-sqlserver-adapter/test/cases/adapter_test_sqlserver.rb:453:in `block (2 levels) in <class:AdapterTestSQLServer>'\r\n```\r\n\r\nThis pull request causes the creation of a temporary table to succeed.\r\n\r\nThe use case for this PR is to make the https://github.com/jpignata/temping gem work with SqlServer.  This PR is necessary for that, but not sufficient: The temping gem will need some changes as well if it is to work with SqlServer.","created_at":"2016-01-10T12:43:26Z","updated_at":"2016-01-10T12:43:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c77c2112a757d8e3d1b8cadb1d51004bae7269a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/435/commits","review_comments_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/435/comments","review_comment_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/435/comments","statuses_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/statuses/fe950c3e35bc9e6a273a57d7f40943d3b4e3214d","head":{"label":"wconrad:create-temporary-table","ref":"create-temporary-table","sha":"fe950c3e35bc9e6a273a57d7f40943d3b4e3214d","user":{"login":"wconrad","id":1935752,"avatar_url":"https://avatars.githubusercontent.com/u/1935752?v=3","gravatar_id":"","url":"https://api.github.com/users/wconrad","html_url":"https://github.com/wconrad","followers_url":"https://api.github.com/users/wconrad/followers","following_url":"https://api.github.com/users/wconrad/following{/other_user}","gists_url":"https://api.github.com/users/wconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/wconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wconrad/subscriptions","organizations_url":"https://api.github.com/users/wconrad/orgs","repos_url":"https://api.github.com/users/wconrad/repos","events_url":"https://api.github.com/users/wconrad/events{/privacy}","received_events_url":"https://api.github.com/users/wconrad/received_events","type":"User","site_admin":false},"repo":{"id":49297557,"name":"activerecord-sqlserver-adapter","full_name":"wconrad/activerecord-sqlserver-adapter","owner":{"login":"wconrad","id":1935752,"avatar_url":"https://avatars.githubusercontent.com/u/1935752?v=3","gravatar_id":"","url":"https://api.github.com/users/wconrad","html_url":"https://github.com/wconrad","followers_url":"https://api.github.com/users/wconrad/followers","following_url":"https://api.github.com/users/wconrad/following{/other_user}","gists_url":"https://api.github.com/users/wconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/wconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wconrad/subscriptions","organizations_url":"https://api.github.com/users/wconrad/orgs","repos_url":"https://api.github.com/users/wconrad/repos","events_url":"https://api.github.com/users/wconrad/events{/privacy}","received_events_url":"https://api.github.com/users/wconrad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wconrad/activerecord-sqlserver-adapter","description":"SQL Server Adapter For Rails","fork":true,"url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter","forks_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/forks","keys_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/teams","hooks_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/hooks","issue_events_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/issues/events{/number}","events_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/events","assignees_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/assignees{/user}","branches_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/branches{/branch}","tags_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/tags","blobs_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/git/refs{/sha}","trees_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/statuses/{sha}","languages_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/languages","stargazers_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/stargazers","contributors_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/contributors","subscribers_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/subscribers","subscription_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/subscription","commits_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/commits{/sha}","git_commits_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/git/commits{/sha}","comments_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/comments{/number}","issue_comment_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/issues/comments{/number}","contents_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/contents/{+path}","compare_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/merges","archive_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/downloads","issues_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/issues{/number}","pulls_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/pulls{/number}","milestones_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/milestones{/number}","notifications_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/labels{/name}","releases_url":"https://api.github.com/repos/wconrad/activerecord-sqlserver-adapter/releases{/id}","created_at":"2016-01-08T21:21:36Z","updated_at":"2016-01-08T21:21:37Z","pushed_at":"2016-01-10T12:31:28Z","git_url":"git://github.com/wconrad/activerecord-sqlserver-adapter.git","ssh_url":"git@github.com:wconrad/activerecord-sqlserver-adapter.git","clone_url":"https://github.com/wconrad/activerecord-sqlserver-adapter.git","svn_url":"https://github.com/wconrad/activerecord-sqlserver-adapter","homepage":"","size":2632,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"rails-sqlserver:master","ref":"master","sha":"caa10cdb4e705c1f1f753f92c749dd429f0f0a53","user":{"login":"rails-sqlserver","id":34626,"avatar_url":"https://avatars.githubusercontent.com/u/34626?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-sqlserver","html_url":"https://github.com/rails-sqlserver","followers_url":"https://api.github.com/users/rails-sqlserver/followers","following_url":"https://api.github.com/users/rails-sqlserver/following{/other_user}","gists_url":"https://api.github.com/users/rails-sqlserver/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-sqlserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-sqlserver/subscriptions","organizations_url":"https://api.github.com/users/rails-sqlserver/orgs","repos_url":"https://api.github.com/users/rails-sqlserver/repos","events_url":"https://api.github.com/users/rails-sqlserver/events{/privacy}","received_events_url":"https://api.github.com/users/rails-sqlserver/received_events","type":"User","site_admin":false},"repo":{"id":76404,"name":"activerecord-sqlserver-adapter","full_name":"rails-sqlserver/activerecord-sqlserver-adapter","owner":{"login":"rails-sqlserver","id":34626,"avatar_url":"https://avatars.githubusercontent.com/u/34626?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-sqlserver","html_url":"https://github.com/rails-sqlserver","followers_url":"https://api.github.com/users/rails-sqlserver/followers","following_url":"https://api.github.com/users/rails-sqlserver/following{/other_user}","gists_url":"https://api.github.com/users/rails-sqlserver/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-sqlserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-sqlserver/subscriptions","organizations_url":"https://api.github.com/users/rails-sqlserver/orgs","repos_url":"https://api.github.com/users/rails-sqlserver/repos","events_url":"https://api.github.com/users/rails-sqlserver/events{/privacy}","received_events_url":"https://api.github.com/users/rails-sqlserver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter","description":"SQL Server Adapter For Rails","fork":false,"url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter","forks_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/forks","keys_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/teams","hooks_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/hooks","issue_events_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/events{/number}","events_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/events","assignees_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/assignees{/user}","branches_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/branches{/branch}","tags_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/tags","blobs_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/statuses/{sha}","languages_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/languages","stargazers_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/stargazers","contributors_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/contributors","subscribers_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/subscribers","subscription_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/subscription","commits_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/contents/{+path}","compare_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/merges","archive_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/downloads","issues_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues{/number}","pulls_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls{/number}","milestones_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/milestones{/number}","notifications_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/labels{/name}","releases_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/releases{/id}","created_at":"2008-11-15T14:53:54Z","updated_at":"2016-01-02T04:47:05Z","pushed_at":"2016-01-10T12:43:27Z","git_url":"git://github.com/rails-sqlserver/activerecord-sqlserver-adapter.git","ssh_url":"git@github.com:rails-sqlserver/activerecord-sqlserver-adapter.git","clone_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter.git","svn_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter","homepage":"","size":2895,"stargazers_count":673,"watchers_count":673,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":349,"mirror_url":null,"open_issues_count":13,"forks":349,"open_issues":13,"watchers":673,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/435"},"html":{"href":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/435"},"issue":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/435"},"comments":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/435/comments"},"review_comments":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/435/comments"},"review_comment":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/pulls/435/commits"},"statuses":{"href":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/statuses/fe950c3e35bc9e6a273a57d7f40943d3b4e3214d"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":29,"deletions":3,"changed_files":3}}