This is my User model.rb
class User < ActiveRecord::Base
attr_accessor :password
attr_accessible :email, :name
validates :name,:presence=>true,:length=>{:maximum=>15}
validates :email,:presence=>true,:length=>{:maximum=>15}
end
I wanted to add a new column of password. I used the command
rails g migration pass_mig password:string
then
rake db:migrate
but in db schema still
ActiveRecord::Schema.define(:version => 20130627073430) do
create_table "users", :force => true do |t|
t.string "name"
t.string "email"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
end
Also in Rails console :Password can not be added in a new User object i.e in a new database entry..Please suggest. P.S: I am new to rails so this might be a silly ques. I am using rails version:3.2.13 and ruby version:1.9.3