From 6533711825c3f197470be041b95e2885bae50bc5 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Fri, 6 Jul 2012 00:05:31 -0700 Subject: enable lockable strategy for users --- db/migrate/20120706065612_add_lockable_to_users.rb | 6 ++++++ db/schema.rb | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20120706065612_add_lockable_to_users.rb (limited to 'db') diff --git a/db/migrate/20120706065612_add_lockable_to_users.rb b/db/migrate/20120706065612_add_lockable_to_users.rb new file mode 100644 index 00000000000..cf86e660876 --- /dev/null +++ b/db/migrate/20120706065612_add_lockable_to_users.rb @@ -0,0 +1,6 @@ +class AddLockableToUsers < ActiveRecord::Migration + def change + add_column :users, :failed_attempts, :integer, :default => 0 + add_column :users, :locked_at, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index f2bb16937f4..f40ee260dc3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120627145613) do +ActiveRecord::Schema.define(:version => 20120706065612) do create_table "events", :force => true do |t| t.string "target_type" @@ -169,6 +169,8 @@ ActiveRecord::Schema.define(:version => 20120627145613) do t.integer "theme_id", :default => 1, :null => false t.string "bio" t.boolean "blocked", :default => false, :null => false + t.integer "failed_attempts", :default => 0 + t.datetime "locked_at" end add_index "users", ["email"], :name => "index_users_on_email", :unique => true -- cgit v1.2.1