Reset Rails Database -
i in world of mess. had issues mailboxer gem , tables created in schema, commented offending attributes , reset database. nothing changed when ran db:migrate, dropped table, created anew , reran migration. schema has not updated reflect attributes had been commented out. ideas why? have error message when trying rake db:migrate aborts , says that:
pg::undefinedtable: error: relation "roles" not exist : alter table "roles" drop "user_id"
my schema has roles table includes following attributes:
create_table "roles", force: true |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" t.integer "user_id" end
i have migration in file intended remove user_id:
class removeuidfromrole < activerecord::migration def change remove_column :roles, :user_id, :integer end end
i have no idea why aborting error telling me remove user id, when have migration that. further, why doesn't schema update reflect recreated db?
Comments
Post a Comment