ruby on rails - rake db:migrate issue postgresql -
i'm complete noob @ postgresql, ruby on rails..
i'm trying follow tutorial (without rubymine) http://www.codeproject.com/articles/575551/user-authentication-in-ruby-on-rails#installingrubymine4
i have such migrate (001_create_user_model.rb):
class createusermodel < activerecord::migration def self.up create_table :users |t| t.column :username, :string t.column :email, :string t.column :password_hash, :string t.column :password_salt, :string end end def self.down drop_table :users end end
the error i'm getting goes this:
syntax error, unexpected ':', expecting ';' or '\n' t.column...sers |t| ... c:131071:in 'disable_dll_transaction' task:top => db:migrate
what this:
class createusermodel < activerecord::migration def self.up create_table :users |t| t.string :username, :null => false t.string :email,:null => false t.string :password_hash, :null => false t.string :password_salt, :null => false t.timestamps end end def self.down drop_table :users end end
Comments
Post a Comment