summaryrefslogtreecommitdiff
path: root/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb
blob: 49436043a669baa9f1ac03959fdf81e1a8deb209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class ChangeDefaultValueOnPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0]
  enable_lock_retries!

  # rubocop:disable Migration/RemoveColumn
  def change
    remove_column :user_details, :password_last_changed_at, :datetime_with_timezone
    add_column :user_details, :password_last_changed_at, :datetime_with_timezone,
               null: false, default: -> { 'NOW()' }, comment: 'JiHu-specific column'
  end
  # rubocop:enable Migration/RemoveColumn
end