GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit aedb5469 authored by Robert Speicher's avatar Robert Speicher

Correct AddDefaultOtpRequiredForLoginValue migration

Also MySQL complains when you change a field to be not null if any
existing records already have a null value, so this updates those rows.
parent d3ff8c1a
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
def down
change_column :users, :otp_required_for_login, :boolean, default: nil
change_column :users, :otp_required_for_login, :boolean, null: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment