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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
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" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---