Hello all, I’m trying to run migrations with this command:

createdb foo && sequel -t -m migrations jdbc:postgresql://localhost/foo


and I’m getting this error:

Sequel::DatabaseError: Java::OrgPostgresqlUtil::PSQLException: ERROR: 
current transaction is aborted, commands ignored until end of transaction 
block

                  raise_error at 
/.../gems/sequel-4.47.0/lib/sequel/database/misc.rb:421

                    statement at 
/.../gems/sequel-4.47.0/lib/sequel/adapters/jdbc.rb:692

             block in execute at 
/.../gems/sequel-4.47.0/lib/sequel/adapters/jdbc.rb:253

                         hold at 
/.../gems/sequel-4.47.0/lib/sequel/connection_pool/threaded.rb:103

                  synchronize at 
/.../gems/sequel-4.47.0/lib/sequel/database/connecting.rb:306

                      execute at 
/.../gems/sequel-4.47.0/lib/sequel/adapters/jdbc.rb:252

                  execute_ddl at 
/.../gems/sequel-4.47.0/lib/sequel/adapters/jdbc.rb:280

  create_table_from_generator at 
/.../gems/sequel-4.47.0/lib/sequel/database/schema_methods.rb:697

                 create_table at 
/.../gems/sequel-4.47.0/lib/sequel/database/schema_methods.rb:213

              block in (root) at 
db/data-warehouse/migrations/001_initial_setup.rb:180

                instance_eval at org/jruby/RubyBasicObject.java:1687

                        apply at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:106

                 block in run at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:562

                 _transaction at 
/.../gems/sequel-4.47.0/lib/sequel/database/transactions.rb:224

         block in transaction at 
/.../gems/sequel-4.47.0/lib/sequel/database/transactions.rb:199

                         hold at 
/.../gems/sequel-4.47.0/lib/sequel/connection_pool/threaded.rb:107

                  synchronize at 
/.../gems/sequel-4.47.0/lib/sequel/database/connecting.rb:306

                  transaction at 
/.../gems/sequel-4.47.0/lib/sequel/database/transactions.rb:165

          checked_transaction at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:474

                 block in run at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:561

                         each at org/jruby/RubyArray.java:1734

                          run at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:558

                          run at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:401

                        apply at 
/.../gems/sequel-4.47.0/lib/sequel/extensions/migration.rb:370

                       <main> at /.../gems/sequel-4.47.0/bin/sequel:160

                         load at org/jruby/RubyKernel.java:979

                       <main> at 
/Users/pavi/.rbenv/versions/jruby-9.1.8.0/bin/sequel:1


I don’t understand what’s causing the transaction to abort. If PostgreSQL 
is returning an error message or error code of some kind, is there any way 
for me to see that?

My migration isn’t doing anything too fancy, and the code should be more or 
less correct because I generated it with sequel -d. The only changes I made 
thereafter were to add create_schema(:dw) and to wrap all the table names 
in the calls to create_table with Sequel.qualify(:dw, :table_name).

My configuration is:


jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 
25.131-b11 on 1.8.0_131-b11 +jit [darwin-x86_64]


And I’m using Sequel 4.47.0.

Any and all help would be greatly appreciated!

Thank you!
Avi

————
Software Architect @ Park Assist » http://tech.parkassist.com/

-- 
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.

Reply via email to