{"action":"opened","issue":{"url":"https://api.github.com/repos/jeremyevans/sequel/issues/1144","repository_url":"https://api.github.com/repos/jeremyevans/sequel","labels_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1144/labels{/name}","comments_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1144/comments","events_url":"https://api.github.com/repos/jeremyevans/sequel/issues/1144/events","html_url":"https://github.com/jeremyevans/sequel/issues/1144","id":132813192,"number":1144,"title":"Default value for pg_enum extension","user":{"login":"AlexWayfer","id":6510020,"avatar_url":"https://avatars.githubusercontent.com/u/6510020?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexWayfer","html_url":"https://github.com/AlexWayfer","followers_url":"https://api.github.com/users/AlexWayfer/followers","following_url":"https://api.github.com/users/AlexWayfer/following{/other_user}","gists_url":"https://api.github.com/users/AlexWayfer/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexWayfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexWayfer/subscriptions","organizations_url":"https://api.github.com/users/AlexWayfer/orgs","repos_url":"https://api.github.com/users/AlexWayfer/repos","events_url":"https://api.github.com/users/AlexWayfer/events{/privacy}","received_events_url":"https://api.github.com/users/AlexWayfer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-10T20:44:48Z","updated_at":"2016-02-10T20:44:48Z","closed_at":null,"body":"Hi!\r\nI can't use `default` flag when create enum-column with `pg_enum` extension:\r\n```ruby\r\ncreate_enum :enum_action, [:follow, :unfollow, :like]\r\n# ...\r\ncreate_table :table_name do\r\n  # ...\r\n  enum_action :action, null: false, default: :follow\r\n  # ...\r\nend\r\n```\r\n\r\n```bash\r\nSequel::DatabaseError: PG::UndefinedColumn: ERROR:  column \"follow\" does not exist\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:186:in `async_exec'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:186:in `block in execute_query'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/logging.rb:35:in `log_yield'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:186:in `execute_query'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:173:in `block in execute'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:149:in `check_disconnect_errors'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:173:in `execute'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:526:in `_execute'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:342:in `block (2 levels) in execute'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:547:in `check_database_errors'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:342:in `block in execute'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/connecting.rb:251:in `block in synchronize'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/connection_pool/threaded.rb:101:in `hold'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/connecting.rb:251:in `synchronize'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/adapters/postgres.rb:342:in `execute'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/query.rb:52:in `execute_dui'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/query.rb:45:in `execute_ddl'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/schema_methods.rb:666:in `create_table_from_generator'\r\n/home/alex/.gem/ruby/2.3.0/gems/sequel-4.31.0/lib/sequel/database/schema_methods.rb:197:in `create_table'\r\n```"}}