I am a newbie in rails; my problem is: I have a table for users, and I need to add more fields...
Where do I put that?
I tried to put it in the migration file, but the schema doesn't change when I run rake db:migrate.
This is in my migration file:
def self.up
 create_table :users do |t|
  t.string :username,         :null => false  # if you use another field as a username, for example email, you can safely remove this field.
  t.string :email,            :default => nil # if you use this field as a username, you might want to make it :null => false.
  t.string :crypted_password, :default => nil
  t.string :salt,             :default => nil
  t.string :nombres,          :default => nil
  t.string :apellidos,        :default => nil
  t.string :codigo,           :default => nil
  t.string :fecha,            :default => nil
  t.string :zona,             :default => nil
  t.string :institucion,      :default => nil
  t.string :frecuencia,       :default => nil
  t.string :pregunta,         :default => nil
  t.string :respuesta,        :default => nil
  t.timestamps
  end
And the schema is still without new fields
create_table "users", :force => true do |t|
t.string   "username",                     :null => false
t.string   "email"
t.string   "crypted_password"
t.string   "salt"
t.string   "nombres"
t.string   "apellidos"
t.string   "codigo"
t.string   "fecha"
t.string   "zona"
t.string   "institucion"
t.string   "frecuencia"
t.datetime "created_at",                   :null => false
t.datetime "updated_at",                   :null => false
t.string   "remember_me_token"
t.datetime "remember_me_token_expires_at"
end
What should I do?
 
     
     
     
    