rails/rails — pull request #13393 by matthewd (2013-12-19 03:19:12+00:00)
Title: Fix PostgreSQL range tests on fresh DB

The changes in c4044b2 meant the tests would error on a fresh DB.

Correcting the name of the table we're creating is self-explanatory.

But we must also move away from the low IDs, because we're not touching the freshly-created primary key sequence; when the time comes, `@new_range` will be assigned an ID of 1.

---

I assume this is currently passing for anyone whose `activerecord_unittest` DB pre-dates c4044b2... if true, I imagine this change is likely to fail (well, skip) for those people.

That being the case, I see three options:

1. Introduce a DROP TABLE IF EXISTS before the create_table in setup (ugly)
2. Move the table creation back to postgresql_specific_schema.rb with all the rest (it was presumably moved for a reason)
3. Declare everyone needs to drop & recreate their testing DB (ugh)

/cc @senny