Make regexps adapt to newer error messages in SQLite 3.8 #766

merged 1 commit into from Feb 19, 2014


None yet
2 participants

itswindtw commented Feb 19, 2014


It seems that SQLite 3.8.2+ changed their error message formats for unique, foreign key and not null constraints.
That makes spec/integration/database_test.rb fail:

1) Sequel::Database constraint violations should raise Sequel::UniqueConstraintViolation when a unique constraint is violated
   Failure/Error: Unable to find matching line from backtrace
     expected Sequel::UniqueConstraintViolation, got #<Sequel::DatabaseError: SQLite3::ConstraintException: UNIQUE constraint failed: test.a> with backtrace:
       # ./lib/sequel/adapters/sqlite.rb:181:in `block (2 levels) in _execute'
       # ./lib/sequel/database/logging.rb:33:in `log_yield'

So I did a small modification to fix it. Hope it can help!


jeremyevans commented Feb 19, 2014

This looks good, I'll merge and test shortly. Thanks for the patch!

@jeremyevans jeremyevans merged commit 672de3d into jeremyevans:master Feb 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment