# Issue with version field in schema\_info

**URL:** <https://www.ruby-forum.com/t/issue-with-version-field-in-schema-info/108893>\
**Category:** Rails\
**Created:** [July 9, 2007, 3:51am UTC](https://www.ruby-forum.com/t/issue-with-version-field-in-schema-info/108893 "2007-07-09T03:51:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [July 9, 2007, 3:51am UTC](https://www.ruby-forum.com/t/issue-with-version-field-in-schema-info/108893/1 "2007-07-09T03:51:42Z")

</div>

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

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?

---

<div class="post-metadata">

**Author:** ![jeannibee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Post date:** [July 9, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/issue-with-version-field-in-schema-info/108893/2 "2007-07-09T19:54:58Z")

</div>

Jean N. wrote:

> (I know ‘version’ is the only field, but in case this changed one day my  
> question will still apply) 😉
> 
> 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.
