summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorRobin Bobbitt <ryehle@us.ibm.com>2017-06-06 11:36:55 -0400
committerRobin Bobbitt <ryehle@us.ibm.com>2017-06-07 11:13:57 -0400
commit8fdba5fac2a5fb4ce17a11580e94a85257e76e2c (patch)
tree916a09bee7bff3ff36862d3cde11ed29977ca416 /db/post_migrate
parent0bcb1d35ecb7db43a075c0a4ae9782991f724f1a (diff)
downloadgitlab-ce-8fdba5fac2a5fb4ce17a11580e94a85257e76e2c.tar.gz
Sync email address from specified omniauth provider - db changes
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb15
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