summaryrefslogtreecommitdiff
path: root/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
blob: f858611d24b6673763c2d33f12f4fc26dffd60e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class RenameUsersLdapEmailToExternalEmail < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    # rubocop:disable Migration/UpdateLargeTable
    rename_column_concurrently :users, :ldap_email, :external_email
  end

  def down
    cleanup_concurrent_column_rename :users, :external_email, :ldap_email
  end
end