dblint icon indicating copy to clipboard operation
dblint copied to clipboard

Breaks with Rails 6

Open rubenfonseca opened this issue 6 years ago • 0 comments

When migrating to Rails 6, all our tests stopped working when using multiple databases. It seems "dblint" either generates the wrong query and uses the wrong connection:

DBLINT (0.2ms)  SET enable_seqscan = off
  DBLINT (0.4ms)  EXPLAIN (FORMAT JSON) SELECT "tickets".* FROM "tickets" ORDER BY "tickets"."id" ASC LIMIT $1  [["LIMIT", 1]]
Traceback (most recent call last):
        1: from (irb):4
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "tickets" does not exist)

rubenfonseca avatar Aug 23 '19 08:08 rubenfonseca