This recent commit caused some spec failures for me:

http://github.com/jeremyevans/sequel/commit/37027c91c48d3a35186f24695dc5a8ce6f3cb714

I run all each spec in a transaction that gets rolled back afterward, on a
DBMS that supports transactions for DDL statements. Whenever I have multiple
examples that call create_table! with the same table name, examples other
than the first are failing:

1. The first example calls create_table!. The table is created and its
schema is cached.
2. The first example completes and the table creation is rolled back.
3. The next example calls create_table!, which calls drop_table. Prior
to 37027, this would have cleared the schema before trying and failing to
drop the table (which doesn't exist due to the rollback). Now it tries and
fails to drop the table, the raise is rescued by create_table!, the example
continues but tries to use the schema cached from the previous example and
fails.

What's the best way to fix this? Add explicit calls to remove_cached_schema
where needed in my code/specs? Or should create_table
call remove_cached_schema?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to