Sha256: 9f0d610bd411e504024775c417ed2ec6a439feea411dc8043bfe72bf6da3ce0f

Contents?: true

Size: 1.16 KB

Versions: 65

Compression:

Stored size: 1.16 KB

Contents

class <%= migration_name %> < ActiveRecord::Migration
  def self.up
    create_table "<%= table_name %>", :force => true do |t|
      t.column :login,                     :string, :limit => 40
      t.column :name,                      :string, :limit => 100, :default => '', :null => true
      t.column :email,                     :string, :limit => 100
      t.column :crypted_password,          :string, :limit => 40
      t.column :salt,                      :string, :limit => 40
      t.column :created_at,                :datetime
      t.column :updated_at,                :datetime
      t.column :remember_token,            :string, :limit => 40
      t.column :remember_token_expires_at, :datetime
<% if options[:include_activation] -%>
      t.column :activation_code,           :string, :limit => 40
      t.column :activated_at,              :datetime<% end %>
<% if options[:stateful] -%>
      t.column :state,                     :string, :null => :no, :default => 'passive'
      t.column :deleted_at,                :datetime<% end %>
    end
    add_index :<%= table_name %>, :login, :unique => true
  end

  def self.down
    drop_table "<%= table_name %>"
  end
end

Version data entries

65 entries across 65 versions & 10 rubygems

Version Path
dwaite-restful-authentication-1.1.1 generators/authenticated/templates/migration.rb
genki-restful-authentication-1.1.1 generators/authenticated/templates/migration.rb
ggoodale-restful-authentication-1.1.1 generators/authenticated/templates/migration.rb
jcnetdev-restful-authentication-1.0.20080704 generators/authenticated/templates/migration.rb
simonmenke-mr_authentication-0.0.1 vendor/plugins/restful-authentication/generators/authenticated/templates/migration.rb
smukherjee-openbill-0.1.5 vendor/plugins/restful-authentication/generators/authenticated/templates/migration.rb
smukherjee-openbill-0.1.6 vendor/plugins/restful-authentication/generators/authenticated/templates/migration.rb
smukherjee-openbill-0.1.7 vendor/plugins/restful-authentication/generators/authenticated/templates/migration.rb
tournament-5.0.0 webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.6 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.5 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.4 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.3 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.2 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
tournament-4.2.0 webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
tournament-4.0.2 webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
tournament-4.0.0 webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.1 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
branston-0.6.0 lib/branston/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb
tournament-3.3.3 webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb