Issue with version field in schema_info


#1

(I know ‘version’ is the only field, but in case this changed one day my
question will still apply) :wink:

I had to drop all my tables to re-run my migrations from version 1. When
I executed ‘rake db:migrate’ everything ran successfully. Which puts my
database ‘state’ at migration 007_xxx.

Now when I add a migration (008_xxx) and re-run ‘rake db:migrate’ I got
an error saying the table being create in migration 001_xxx already
exists.

When I checked the table “select * from schema_info” there was nothing
in the table. Inserting the proper version number by hand and re-running
my migrate worked and migration 008 worked. All ‘rake db:migrate’ being
run from here update the table successfully.

I can re-create this 100% of the time.

Comments?


#2

Jean N. wrote:

(I know ‘version’ is the only field, but in case this changed one day my
question will still apply) :wink:

I had to drop all my tables to re-run my migrations from version 1. When
I executed ‘rake db:migrate’ everything ran successfully. Which puts my
database ‘state’ at migration 007_xxx.

Now when I add a migration (008_xxx) and re-run ‘rake db:migrate’ I got
an error saying the table being create in migration 001_xxx already
exists.

When I checked the table “select * from schema_info” there was nothing
in the table. Inserting the proper version number by hand and re-running
my migrate worked and migration 008 worked. All ‘rake db:migrate’ being
run from here update the table successfully.

I can re-create this 100% of the time.

Comments?

/bump

Issue: schema_info not updating / inserting prope migration version
after a ‘wipe’ and re-creation of the database.