# Db:migrate non-functional?

**URL:** <https://www.ruby-forum.com/t/db-migrate-non-functional/84595>\
**Category:** Rails\
**Created:** [February 6, 2007, 8:43am UTC](https://www.ruby-forum.com/t/db-migrate-non-functional/84595 "2007-02-06T08:43:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [February 6, 2007, 8:43am UTC](https://www.ruby-forum.com/t/db-migrate-non-functional/84595/1 "2007-02-06T08:43:39Z")

</div>

Am new to rails, but catching up fast.  
i have developed my model

…generate model people

* * *

class CreatePeoples \< ActiveRecord::Migration  
def self.up  
create\_table :peoples do |t|  
t.column :name, :string  
t.column :hashed\_password, :string  
t.column :salt, :string  
end  
end

## def self.down drop\_table :peoples end end

blah blah… rake db:migrate

all life signals confirmed to be ok  
no errors generated by rake command

but ooops when i check the database … no table was actually created  
despite  
running a successful rake

schema.rb seems to record a table creation but actually no table was  
created when i check in the database.

can somebody help in explaining?  
thanks

---

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [February 6, 2007, 9:51am UTC](https://www.ruby-forum.com/t/db-migrate-non-functional/84595/2 "2007-02-06T09:51:23Z")

</div>

If you previously ran this migration and it failed, the schema version  
might be set to the migration that you are running. i.e. This  
migration is being ignored.

Try:  
rake db:migrate VERSION=X  
where X is a previous migration.

To roll the whole thing back:  
rake db:migrate VERSION=0

Or if you’re using sqlite3, simply delete the file and run the  
migrations again

hth

> ```
> create_table :peoples do |t|
> 
> ```

On a different note ActiveRecord would probably be happier with a  
singular “Person” and plural “People”

---

<div class="post-metadata">

**Author:** ![georgeuoa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@georgeuoa](https://www.ruby-forum.com/u/georgeuoa)\
**Post date:** [February 6, 2007, 10:16am UTC](https://www.ruby-forum.com/t/db-migrate-non-functional/84595/3 "2007-02-06T10:16:10Z")

</div>

toby privett wrote:

> If you previously ran this migration and it failed, the schema version  
> might be set to the migration that you are running. i.e. This  
> migration is being ignored.
> 
> Try:  
> rake db:migrate VERSION=X  
> where X is a previous migration.
> 
> To roll the whole thing back:  
> rake db:migrate VERSION=0
> 
> Or if you’re using sqlite3, simply delete the file and run the  
> migrations again
> 
> hth
> 
> > ```
> > create_table :peoples do |t|
> > 
> > ```
> 
> On a different note ActiveRecord would probably be happier with a  
> singular “Person” and plural “People”

it has worked!  
, thanks a lot and i love this forum!
