changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb

changeset 4: 43c5e6930eee
author: moriq@moriq.com
date: Wed Mar 05 01:17:41 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugin restful_authentication.
1class <%= migration_name %> < ActiveRecord::Migration
2 def self.up
3 create_table "<%= table_name %>", :force => true do |t|
4 t.column :login, :string
5 t.column :email, :string
6 t.column :crypted_password, :string, :limit => 40
7 t.column :salt, :string, :limit => 40
8 t.column :created_at, :datetime
9 t.column :updated_at, :datetime
10 t.column :remember_token, :string
11 t.column :remember_token_expires_at, :datetime
12 <% if options[:include_activation] %>t.column :activation_code, :string, :limit => 40
13 t.column :activated_at, :datetime<% end %>
14 <% if options[:stateful] %>t.column :state, :string, :null => :no, :default => 'passive'
15 t.column :deleted_at, :datetime<% end %>
16 end
17 end
18
19 def self.down
20 drop_table "<%= table_name %>"
21 end
22end