# Help rebuilding my database

**URL:** <https://www.ruby-forum.com/t/help-rebuilding-my-database/118684>\
**Category:** Rails\
**Created:** [October 30, 2007, 2:00am UTC](https://www.ruby-forum.com/t/help-rebuilding-my-database/118684 "2007-10-30T02:00:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@rohit](https://www.ruby-forum.com/u/rohit)\
**Post date:** [October 30, 2007, 2:00am UTC](https://www.ruby-forum.com/t/help-rebuilding-my-database/118684/1 "2007-10-30T02:00:33Z")

</div>

Hey Everyone,

I wanted to start with a fresh database, so I deleted my database,  
db\_name\_dev, and then recreated it.  
However, when I run rake db:migrate, instead of recreating my schema,  
I get this error:

Mysql::Error: Table ‘db\_name\_dev.xxxx’ doesn’t exist: SHOW FIELDS FROM  
xxxx

This leads me to believe that somehow my app or MySQL doesn’t know  
that I’ve started over, as it is looking for a table that will be  
recreated in my migration.

Why would it do that? I’ve gone through similar steps in the past  
(delete db, recreate, and run migrations) and have never seen this  
before. Does anyone know how I can force a fresh start so that I can  
use my migrations to rebuild my schema?

Thanks very much,  
Rohit

---

<div class="post-metadata">

**Author:** ![rohit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@rohit](https://www.ruby-forum.com/u/rohit)\
**Post date:** [October 30, 2007, 7:45am UTC](https://www.ruby-forum.com/t/help-rebuilding-my-database/118684/2 "2007-10-30T07:45:52Z")

</div>

I think I’ve figured this out, by reverting to previous versions of my  
schema using VERSION=x, and then checking if rake db:migrate brings me  
back to the current schema successfully. It looks like I had  
conflicts between some migrations, although from the original error  
message was not clear which ones.
