-
Notifications
You must be signed in to change notification settings - Fork 563
Description
I'm updating our Rails application from 2.3 to 3.2.8. We have some problem running the migrations. For some of the renames in the migrations we get an error message: "No such column". I've debugged the issue and it seems there's some kind of problem with the schema cache. If I add a debugger just before the following exception is raised:
If I then, in the debugger, run schema_cache.columns[table_name].length I get back 5. But when I run columns(table_name).length I get back 24. When I call columns I can see in the returned value that it do contains the column we want to rename. So it seems the schema cache isn't updated correctly, for some reason.
I don't know if it matters but we have migrations both with the old style, just an incremented number in the name of the migration. And the current style with a date and a number.