diff options
Diffstat (limited to 'db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb')
-rw-r--r-- | db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb b/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb new file mode 100644 index 00000000000..15edb402b86 --- /dev/null +++ b/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb @@ -0,0 +1,15 @@ +class CleanupUsersLdapEmailRename < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + cleanup_concurrent_column_rename :users, :ldap_email, :external_email + end + + def down + rename_column_concurrently :users, :external_email, :ldap_email + end +end |