summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-10-12 15:38:24 +0200
committerDouwe Maan <douwe@selenight.nl>2017-11-02 11:39:03 +0100
commit9d6c7d9e9c3ed8ae81f6468afb76c9b11d1f3fd5 (patch)
treeb198d4ecb55e39a8e8fbcfc425c24873913048ab /db
parent3111c2f58c9ea2002ed4cf92540a61bfcb8322f2 (diff)
downloadgitlab-ce-9d6c7d9e9c3ed8ae81f6468afb76c9b11d1f3fd5.tar.gz
Remove user authentication_token column
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20171012150314_remove_user_authentication_token.rb20
-rw-r--r--db/schema.rb2
2 files changed, 20 insertions, 2 deletions
diff --git a/db/post_migrate/20171012150314_remove_user_authentication_token.rb b/db/post_migrate/20171012150314_remove_user_authentication_token.rb
new file mode 100644
index 00000000000..d0f3aa06e98
--- /dev/null
+++ b/db/post_migrate/20171012150314_remove_user_authentication_token.rb
@@ -0,0 +1,20 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class RemoveUserAuthenticationToken < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ remove_column :users, :authentication_token
+ end
+
+ def down
+ add_column :users, :authentication_token, :string
+
+ add_concurrent_index :users, :authentication_token, unique: true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 530f08022be..be381751238 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1670,7 +1670,6 @@ ActiveRecord::Schema.define(version: 20171017145932) do
t.string "skype", default: "", null: false
t.string "linkedin", default: "", null: false
t.string "twitter", default: "", null: false
- t.string "authentication_token"
t.string "bio"
t.integer "failed_attempts", default: 0
t.datetime "locked_at"
@@ -1720,7 +1719,6 @@ ActiveRecord::Schema.define(version: 20171017145932) do
end
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
- add_index "users", ["authentication_token"], name: "index_users_on_authentication_token", unique: true, using: :btree
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
add_index "users", ["created_at"], name: "index_users_on_created_at", using: :btree
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree