Sha256: 3cc162fcab5dce37e952bbb981587267e2d8958e288c15f54def3af97d34336b

Contents?: true

Size: 995 Bytes

Versions: 6

Compression:

Stored size: 995 Bytes

Contents

class Create<%= user_plural_class_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= user_plural_name %> do |t|
      t.string :email
      t.string :first_name
      t.string :last_name
      t.string :language, :default => "en"
      t.string :crypted_password, :limit => 128
      t.string :password_salt, :limit => 20
      t.string :persistence_token, :limit => 128
      t.string :single_access_token, :limit => 20
      t.string :perishable_token, :limit => 20

      t.integer :roles_mask, :default => 1
      t.boolean :active, :default => false, :null => false

      t.integer   :login_count, :null => false, :default => 0
      t.integer   :failed_login_count, :null => false, :default => 0
      t.datetime  :last_request_at
      t.datetime  :current_login_at
      t.datetime  :last_login_at
      t.string    :current_login_ip
      t.string    :last_login_ip

      t.timestamps
    end
  end

  def self.down
    drop_table :<%= user_plural_name %>
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mondo-generators-0.6.9 rails_generators/mondo_authentication/templates/migration.rb
mondo-generators-0.6.8 rails_generators/mondo_authentication/templates/migration.rb
mondo-generators-0.6.7 rails_generators/mondo_authentication/templates/migration.rb
mondo-generators-0.6.5 rails_generators/mondo_authentication/templates/migration.rb
mondo-generators-0.6.4 rails_generators/mondo_authentication/templates/migration.rb
mondo-generators-0.6.3 rails_generators/mondo_authentication/templates/migration.rb