# Noob db:migrate question

**URL:** <https://www.ruby-forum.com/t/noob-db-migrate-question/128135>\
**Category:** Rails\
**Created:** [February 5, 2008, 8:59am UTC](https://www.ruby-forum.com/t/noob-db-migrate-question/128135 "2008-02-05T08:59:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 5, 2008, 8:59am UTC](https://www.ruby-forum.com/t/noob-db-migrate-question/128135/1 "2008-02-05T08:59:57Z")

</div>

I am using RadRails and reading through the Dummies book. I have  
created a db (company) and a model (Employee). I edited the  
001\_create\_employees.rb script by copy and paste from the book. When I  
use Rake Tasks (db:migrate) -\> Go, after a few moments the Console  
displays " migrate [internal launch] rake (datetime)", and  
no db table is created. I tested the db credentials using the mysql  
client on the command line and that appears correct. I don’t know what  
else to do at this point. Can anyone give me a hint?

---

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 5, 2008, 10:23am UTC](https://www.ruby-forum.com/t/noob-db-migrate-question/128135/2 "2008-02-05T10:23:27Z")

</div>

On 5 Feb 2008, at 07:59, rogwei wrote:

> I am using RadRails and reading through the Dummies book. I have  
> created a db (company) and a model (Employee). I edited the  
> 001\_create\_employees.rb script by copy and paste from the book. When I  
> use Rake Tasks (db:migrate) -\> Go, after a few moments the Console  
> displays " migrate [internal launch] rake (datetime)", and  
> no db table is created. I tested the db credentials using the mysql  
> client on the command line and that appears correct. I don’t know what  
> else to do at this point. Can anyone give me a hint?

Had you run the migration before? If you run a (for example) empty  
migration and then edit it, rails won’t rerun the migration. You need  
to migrate down (rake rb:migrate VERSION=XXX) and back up again.  
Other than that, maybe something is up with the migration itself?

Fred

---

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 5, 2008, 7:06pm UTC](https://www.ruby-forum.com/t/noob-db-migrate-question/128135/3 "2008-02-05T19:06:42Z")

</div>

The full story…I started using Rails 2.0 but found the book author’s  
blog that said you had to downgrade to 1.2.3 for all the samples to  
work. Consequently, I uninstalled Rails 2.0 and installed 1.2.3. I  
deleted the original company project (from disk, too), dropped the  
previously migrated employees table in phpAdmin, and started over.  
Where does Rake get its memory of the previous migration?

On Feb 5, 1:22 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![rogwei](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@rogwei](https://www.ruby-forum.com/u/rogwei)\
**Post date:** [February 5, 2008, 7:53pm UTC](https://www.ruby-forum.com/t/noob-db-migrate-question/128135/4 "2008-02-05T19:53:22Z")

</div>

Ok, I used the VERSION=001 option in Rake and it worked. Thanks,  
Frederick.
