{"action":"created","issue":{"url":"https://api.github.com/repos/jeremyevans/sequel/issues/1522","repository_url":"https://api.github.com/repos/jeremyevans/sequel","labels_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1522/labels{/name}","comments_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1522/comments","events_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1522/events","html_url":"https://github.com/jeremyevans/sequel/issues/1522","id":330195922,"node_id":"MDU6SXNzdWUzMzAxOTU5MjI=","number":1522,"title":"PG uuid primary key column migration broken since 5.7.0","user":{"login":"carlhoerberg","id":180046,"node_id":"MDQ6VXNlcjE4MDA0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/180046?v=4","gravatar_id":"","url":"https://api.github.com/users/carlhoerberg","html_url":"https://github.com/carlhoerberg","followers_url":"https://api.github.com/users/carlhoerberg/followers","following_url":"https://api.github.com/users/carlhoerberg/following{/other_user}","gists_url":"https://api.github.com/users/carlhoerberg/gists{/gist_id}","starred_url":"https://api.github.com/users/carlhoerberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlhoerberg/subscriptions","organizations_url":"https://api.github.com/users/carlhoerberg/orgs","repos_url":"https://api.github.com/users/carlhoerberg/repos","events_url":"https://api.github.com/users/carlhoerberg/events{/privacy}","received_events_url":"https://api.github.com/users/carlhoerberg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-07T09:44:42Z","updated_at":"2018-06-17T19:30:26Z","closed_at":"2018-06-07T14:17:27Z","author_association":"CONTRIBUTOR","body":"### Complete Description of Issue\r\n\r\nSince Sequel 5.7.0 our migrations with UUID primary keys doesn't work anymore. \r\n\r\n### Simplest Possible Self-Contained Example Showing the Bug\r\n\r\n```\r\n$ createdb db1\r\n$ mkdir -p mig\r\n$ cat > mig/01_primary.rb <<EOF\r\nSequel.migration do\r\n  change do\r\n    create_table :t1 do\r\n      primary_key :id, type: 'uuid'\r\n    end\r\n  end\r\nend\r\nEOF\r\n$ sequel -m mig/ -E postgres://localhost/db1\r\n```\r\n\r\n### Full Backtrace of Exception (if any)\r\n\r\n```\r\nE, [2018-06-07T11:38:30.987028 #84823] ERROR -- : PG::InvalidParameterValue: ERROR:  identity column type must be smallint, integer, or bigint: CREATE TABLE \"t1\" (\"id\" uuid GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY)\r\nI, [2018-06-07T11:38:30.987420 #84823]  INFO -- : (0.000143s) ROLLBACK\r\nError: Sequel::DatabaseError: PG::InvalidParameterValue: ERROR:  identity column type must be smallint, integer, or bigint\r\n\r\n/Users/carl/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/sequel-5.9.0/lib/sequel/adapters/postgres.rb:146:in `async_exec'\r\n```\r\n\r\n### Other\r\n\r\nWith Sequel 5.5.0 the resulting SQL from of the migration is: \r\n\r\n```\r\nCREATE TABLE \"t1\" (\"id\" uuid PRIMARY KEY)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jeremyevans/sequel/issues/comments/397900875","html_url":"https://github.com/jeremyevans/sequel/issues/1522#issuecomment-397900875","issue_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1522","id":397900875,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzkwMDg3NQ==","user":{"login":"EricWVGG","id":617762,"node_id":"MDQ6VXNlcjYxNzc2Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/617762?v=4","gravatar_id":"","url":"https://api.github.com/users/EricWVGG","html_url":"https://github.com/EricWVGG","followers_url":"https://api.github.com/users/EricWVGG/followers","following_url":"https://api.github.com/users/EricWVGG/following{/other_user}","gists_url":"https://api.github.com/users/EricWVGG/gists{/gist_id}","starred_url":"https://api.github.com/users/EricWVGG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricWVGG/subscriptions","organizations_url":"https://api.github.com/users/EricWVGG/orgs","repos_url":"https://api.github.com/users/EricWVGG/repos","events_url":"https://api.github.com/users/EricWVGG/events{/privacy}","received_events_url":"https://api.github.com/users/EricWVGG/received_events","type":"User","site_admin":false},"created_at":"2018-06-17T19:30:26Z","updated_at":"2018-06-17T19:30:26Z","author_association":"NONE","body":"I feel like this error message should be better written. Identity columns must not necessarily be smallint, integer, or bigint…"}}
{"actor":{"display_login":"EricWVGG"}}