Guest User

Untitled

a guest
Jun 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. class CreateUsers < ActiveRecord::Migration
  2. def self.up
  3. create_table "users", :force => true do |t|
  4. t.column :login, :string, :limit => 40
  5. t.column :name, :string, :limit => 100, :default => '', :null => true
  6. t.column :email, :string, :limit => 100
  7. t.column :phone, :string, :limig => 40
  8. t.column :address, :string
  9. t.column :crypted_password, :string, :limit => 40
  10. t.column :salt, :string, :limit => 40
  11. t.column :created_at, :datetime
  12. t.column :updated_at, :datetime
  13. t.column :role, :string, :limit => 1
  14. t.column :maxdomains, :integer
  15. t.column :maxaliases, :integer
  16. t.column :maxvhosts, :integer
  17. t.column :remember_token, :string, :limit => 40
  18. t.column :remember_token_expires_at, :datetime
  19.  
  20.  
  21. end
  22. add_index :users, :login, :unique => true
  23. end
  24.  
  25. def self.down
  26. drop_table "users"
  27. end
  28. e
Add Comment
Please, Sign In to add comment