summaryrefslogtreecommitdiff
path: root/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb')
-rw-r--r--db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb b/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb
new file mode 100644
index 00000000000..d54ff3d5f5e
--- /dev/null
+++ b/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb
@@ -0,0 +1,15 @@
+class CleanupApplicationSettingsPasswordAuthenticationEnabledRename < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :application_settings, :password_authentication_enabled, :password_authentication_enabled_for_web
+ end
+
+ def down
+ rename_column_concurrently :application_settings, :password_authentication_enabled_for_web, :password_authentication_enabled
+ end
+end