Dropping foreign keys broken on PostgreSQL with rails 2.3.5
Reported by Betelgeuse | September 20th, 2010 @ 09:23 PM | in Hobo 1.1
>=rails-2.3.6 protects you from this (but until 2.3.8 they have bad regressions, not sure about 2.3.9 yet): http://github.com/rebelhold/rails/commit/99bcce7ec1e7f59db3e6f1e1d3...
For MySQL hobo has added a safeguard in ticket #566. This however does not work for PostgreSQL because the Exception thrown is PGError:
rake aborted!
An error has occurred, this and all later migrations canceled:
PGError: ERROR: current transaction is aborted, commands ignored until end of transaction block
: INSERT INTO schema_migrations (version) VALUES ('20100920192722')
From postgres logs I can see
ERROR: index "index_that_we_are_trying_to_drop" does not exist
Comments and changes to this ticket
-
Bryan Larsen November 15th, 2010 @ 09:44 PM
- State changed from new to open
- Milestone set to Hobo 1.1
- Milestone order changed from 197887 to 0
-
Bryan Larsen November 15th, 2010 @ 09:45 PM
The comment of #566 says we should make a better fix. I guess it was right. :)
-
Matt Jones November 19th, 2010 @ 07:04 PM
A better fix was included in more recent versions of Rails ( https://github.com/rails/rails/commit/99bcce7ec1e7f59db3e6f1e1d3cd0... ), so we can probably remove that rescue entirely.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป