Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-10-12 16:38:24 +0300
committerDouwe Maan <douwe@selenight.nl>2017-11-02 13:39:03 +0300
commit9d6c7d9e9c3ed8ae81f6468afb76c9b11d1f3fd5 (patch)
treeb198d4ecb55e39a8e8fbcfc425c24873913048ab /db/post_migrate
parent3111c2f58c9ea2002ed4cf92540a61bfcb8322f2 (diff)
Remove user authentication_token column
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20171012150314_remove_user_authentication_token.rb20
1 files changed, 20 insertions, 0 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