Sha256: 811079979c39b873d134c6414cf90c78604f403880005d01e596a105b76246e9

Contents?: true

Size: 601 Bytes

Versions: 17

Compression:

Stored size: 601 Bytes

Contents

class SorceryCore < ActiveRecord::Migration
  def self.up
    create_table :<%= model_class_name.tableize %> 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.timestamps
    end
  end

  def self.down
    drop_table :<%= model_class_name.tableize %>
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sorcery-0.8.4 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.8.2 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.8.1 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.8.0 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.13 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.12 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.11 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.10 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.9 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.8 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.7 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.6 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.5 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.4 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.3 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.2 lib/generators/sorcery/templates/migration/core.rb
sorcery-0.7.1 lib/generators/sorcery/templates/migration/core.rb