summaryrefslogtreecommitdiff
path: root/db/post_migrate/20171012150314_remove_user_authentication_token.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20171012150314_remove_user_authentication_token.rb')
-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