Permalink
Browse files

modified devise migration to satisfy new gem version

  • Loading branch information...
1 parent 4fb4a99 commit 73ef1cce191ac01a71eb390ad2b08c8888e343b4 @jpslav jpslav committed Jun 19, 2012
Showing with 102 additions and 72 deletions.
  1. +37 −8 db/migrate/20110412195353_devise_create_users.rb
  2. +65 −64 db/schema.rb
@@ -1,15 +1,44 @@
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
- t.database_authenticatable :null => false
- t.recoverable
- t.rememberable
- t.trackable
- t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
- t.confirmable
- # t.encryptable
- # t.token_authenticatable
+ ## Database authenticatable
+ t.string :email, :null => false, :default => ""
+ t.string :encrypted_password, :null => false, :default => ""
+
+ ## Recoverable
+ t.string :reset_password_token
+ t.datetime :reset_password_sent_at
+
+ ## Rememberable
+ t.datetime :remember_created_at
+
+ ## Trackable
+ t.integer :sign_in_count, :default => 0
+ t.datetime :current_sign_in_at
+ t.datetime :last_sign_in_at
+ t.string :current_sign_in_ip
+ t.string :last_sign_in_ip
+
+ ## Encryptable
+ # t.string :password_salt
+
+ ## Confirmable
+ t.string :confirmation_token
+ t.datetime :confirmed_at
+ t.datetime :confirmation_sent_at
+ # t.string :unconfirmed_email # Only if using reconfirmable
+
+ ## Lockable
+ t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
+ t.string :unlock_token # Only if unlock strategy is :email or :both
+ t.datetime :locked_at
+
+ # Token authenticatable
+ # t.string :authentication_token
+
+ ## Invitable
+ # t.string :invitation_token
t.timestamps
end
View
@@ -18,16 +18,16 @@
t.text "subject"
t.text "body"
t.boolean "force"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "answer_choices", :force => true do |t|
t.integer "question_id"
t.text "content"
t.decimal "credit"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "content_html", :limit => 255
end
@@ -37,57 +37,57 @@
t.integer "attachment_file_size"
t.datetime "attachment_updated_at"
t.integer "uploader_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "attachable_assets", :force => true do |t|
t.integer "attachable_id"
t.integer "asset_id"
t.string "local_name"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "description"
t.string "attachable_type"
end
create_table "comment_thread_subscriptions", :force => true do |t|
t.integer "comment_thread_id"
t.integer "user_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "unread_count", :default => 0
end
create_table "comment_threads", :force => true do |t|
t.string "commentable_type"
t.integer "commentable_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "comments", :force => true do |t|
t.integer "comment_thread_id"
t.text "message"
t.integer "creator_id"
t.boolean "is_log"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "deputizations", :force => true do |t|
t.integer "deputizer_id"
t.integer "deputy_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "licenses", :force => true do |t|
t.string "short_name"
t.string "long_name"
t.string "url"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "agreement_partial_name"
t.boolean "is_default"
end
@@ -96,8 +96,8 @@
t.string "name"
t.integer "number"
t.text "summary"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "always_required"
end
@@ -107,47 +107,47 @@
t.text "code"
t.text "minified_code"
t.boolean "deprecated"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "logics", :force => true do |t|
t.text "code"
t.string "variables"
t.string "logicable_type"
t.integer "logicable_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "cached_code"
t.string "variables_array"
t.string "required_logic_library_version_ids"
end
create_table "messages", :force => true do |t|
t.string "subject"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "project_members", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
t.boolean "is_default"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "project_questions", :force => true do |t|
t.integer "project_id"
t.integer "question_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "projects", :force => true do |t|
t.string "name"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "question_collaborators", :force => true do |t|
@@ -156,50 +156,50 @@
t.integer "position"
t.boolean "is_author", :default => false
t.boolean "is_copyright_holder", :default => false
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "question_role_requests_count", :default => 0
end
create_table "question_dependency_pairs", :force => true do |t|
t.integer "independent_question_id"
t.integer "dependent_question_id"
t.string "kind"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "question_derivations", :force => true do |t|
t.integer "derived_question_id"
t.integer "source_question_id"
t.integer "deriver_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "question_parts", :force => true do |t|
t.integer "multipart_question_id"
t.integer "child_question_id"
t.integer "order"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "question_role_requests", :force => true do |t|
t.integer "question_collaborator_id"
t.boolean "toggle_is_author"
t.boolean "toggle_is_copyright_holder"
t.integer "requestor_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "is_approved", :default => false
t.boolean "is_accepted", :default => false
end
create_table "question_setups", :force => true do |t|
t.text "content"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "content_html", :limit => 255
end
@@ -209,8 +209,8 @@
t.string "question_type"
t.text "content"
t.integer "question_setup_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.integer "license_id"
t.text "content_html", :limit => 255
t.integer "locked_by", :default => -1
@@ -225,8 +225,8 @@
t.integer "creator_id"
t.text "content"
t.integer "question_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "content_html"
t.text "explanation"
t.boolean "is_visible"
@@ -253,36 +253,37 @@
t.integer "user_id"
t.boolean "project_member_email", :default => true
t.boolean "role_request_email", :default => true
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "announcement_email"
t.boolean "auto_author_subscribe", :default => true
end
create_table "users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :default => "", :null => false
t.string "reset_password_token"
+ t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
- t.integer "sign_in_count", :default => 0
+ t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
- t.integer "failed_attempts", :default => 0
- t.string "unlock_token"
- t.datetime "locked_at"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.integer "failed_attempts", :default => 0
+ t.string "unlock_token"
+ t.datetime "locked_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "first_name"
t.string "last_name"
- t.boolean "is_administrator", :default => false
+ t.boolean "is_administrator", :default => false
t.string "username"
t.datetime "disabled_at"
- t.integer "unread_message_count", :default => 0
+ t.integer "unread_message_count", :default => 0
end
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
@@ -295,16 +296,16 @@
t.boolean "thumbs_up"
t.string "votable_type"
t.integer "votable_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "website_configurations", :force => true do |t|
t.string "name"
t.string "value"
t.string "value_type"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
end

0 comments on commit 73ef1cc

Please sign in to comment.