Forum: Ruby on Rails Join Table Migration Error

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
9e7cdfa62c6bc2a155f2f7950484e573?d=identicon&s=25 Brandon S. (deniedlates)
on 2007-01-22 14:25
Hi all,

I have two models in my rails application, Section and User.  I have a
has_and_belongs_to_many relationship between both.

After running the migration for creating sections, creating users, and
creating the join table, everything works fine.  But if I try to
rollback my database migrations (which I frequently do during
development), I get the following error after the join table is deleted
but before the users table is deleted:

Mysql::Error: Table 'rails_app_development.sections_users' doesn't
exist: SHOW FIELDS FROM sections_users

Is there a way to avoid this error?  I've tried moving the "drop_table"
command for the join table to an earlier migration, but I still get

Any help is appreciated.
This topic is locked and can not be replied to.