On Thursday, May 19, 2016 at 10:29:11 AM UTC-7, [email protected] wrote: > > Hi. > > I'm facing a problem trying to add a new value for an existing enum in > Postgres. > > What I'm trying to do: > > Sequel.extension :pg_enum > > Sequel.migration do > up do > extension :pg_enum > > add_enum_value(:professional_status_enum, 'self_employed') > end > end > > Part of stacktrace: > > Sequel::DatabaseError: PG::ActiveSqlTransaction: ERROR: ALTER TYPE ... > ADD cannot run inside a transaction block > /home/vagrant/.rvm/gems/ruby-2.3.0@bankfacil-core/gems/sequel-4.27.0/lib/sequel/adapters/postgres.rb:184:in > > `async_exec' > /home/vagrant/.rvm/gems/ruby-2.3.0@bankfacil-core/gems/sequel-4.27.0/lib/sequel/adapters/postgres.rb:184:in > > `block in execute_query' > /home/vagrant/.rvm/gems/ruby-2.3.0@bankfacil-core/gems/sequel-rails-0.9.11/lib/sequel_rails/sequel/database/active_support_notification.rb:16:in > > `block in log_yield' > /home/vagrant/.rvm/gems/ruby-2.3.0@bankfacil-core/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in > > `block in instrument' > /home/vagrant/.rvm/gems/ruby-2.3.0@bankfacil-core/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in > > `instrument' > /home/vagrant/.rvm/gems/ruby-2.3.0@bankfacil-core/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in > > `instrument' > > You probably just want to disable transactions for that migration: http://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html#label-Transactions Thanks, Jeremy
-- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
