I've run rake db:migrate
and all of my migrations ran. However, when I try to run rake db:test:prepare
I get the error:
You have 1 pending migrations:
20130724211328 CreateGalleries
Run `rake db:migrate` to update your database then try again.
Then running rake db:migrate
again gives the error:
PG::Error: ERROR: relation "galleries" already exists...
But in the console I can create and manipulate the Gallery model exactly as shown in the CreateGalleries migration. The table is not being created or even mentioned in any other migrations.
It seems the migration ran just fine but did not register. Any ideas how to fix this?
EDIT
I solved this with rake db:drop db:create db:migrate
then rake db:test:prepare
, but I'm happy to give the solution to anyone who can shed light on what caused the problem in the first place.