Class: SorceryCore
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- SorceryCore
- Defined in:
- lib/generators/sorcery_migration/templates/core.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/sorcery_migration/templates/core.rb', line 13 def self.down drop_table :users end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/sorcery_migration/templates/core.rb', line 2 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. end end |