Browse files

switching to authlogic

  • Loading branch information...
1 parent a4fc54a commit 8f9f7a6df6fc0d998a8b95e1f96524b71d97aac8 @lachie committed Jun 1, 2009
Showing with 23 additions and 0 deletions.
  1. +2 −0 app/models/user_session.rb
  2. +21 −0 db/migrate/20090601115736_alter_for_authlogic.rb
View
2 app/models/user_session.rb
@@ -0,0 +1,2 @@
+class UserSession < Authlogic::Session::Base
+end
View
21 db/migrate/20090601115736_alter_for_authlogic.rb
@@ -0,0 +1,21 @@
+class AlterForAuthlogic < ActiveRecord::Migration
+ def self.up
+ rename_column :users, :salt , :password_salt
+ rename_column :users, :openid, :openid_identifier
+
+ add_column :users, :persistence_token , :string, :null => false, :default => ''
+ add_column :users, :single_access_token, :string, :null => false, :default => ''
+ add_column :users, :perishable_token , :string, :null => false, :default => ''
+
+ add_column :users, :login_count, :integer, :null => false, :default => 0
+ add_column :users, :failed_login_count, :integer, :null => false, :default => 0
+ add_column :users, :last_request_at, :datetime
+ add_column :users, :current_login_at, :datetime
+ add_column :users, :last_login_at, :datetime
+ add_column :users, :current_login_ip, :string
+ add_column :users, :last_login_ip, :string
+ end
+
+ def self.down
+ end
+end

0 comments on commit 8f9f7a6

Please sign in to comment.