Guest User

Untitled

a guest
Sep 3rd, 2018
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. require 'digest/sha1'
  2. require 'lib/model/user'
  3.  
  4. class CreateUsers < ActiveRecord::Migration
  5. def self.up
  6. create_table :users do |t|
  7. t.string :username, :null => false, :limit => 40
  8. t.string :password, :null => false, :limit => 40
  9. end
  10.  
  11. User.create({ :username => "steph@endpoint.com",
  12. :password => Digest::SHA1.hexdigest("password") })
  13. end
  14.  
  15. def self.down
  16. drop_table :users
  17. end
  18. end
Add Comment
Please, Sign In to add comment