Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20150620233230_add_default_otp_required_for_login_value.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: da0fd457a34d2c7e05f389290ca0d2320eb22274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# rubocop:disable all
class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration
  def up
    execute %q{UPDATE users SET otp_required_for_login = FALSE WHERE otp_required_for_login IS NULL}

    change_column :users, :otp_required_for_login, :boolean, default: false, null: false
  end

  def down
    change_column :users, :otp_required_for_login, :boolean, null: true
  end
end