diff options
Diffstat (limited to 'db/migrate/20211210025754_alter_constraint_of_phone.rb')
-rw-r--r-- | db/migrate/20211210025754_alter_constraint_of_phone.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/db/migrate/20211210025754_alter_constraint_of_phone.rb b/db/migrate/20211210025754_alter_constraint_of_phone.rb deleted file mode 100644 index 1644fbe9000..00000000000 --- a/db/migrate/20211210025754_alter_constraint_of_phone.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AlterConstraintOfPhone < Gitlab::Database::Migration[1.0] - disable_ddl_transaction! - - def up - constraint_phone = check_constraint_name('verification_codes', 'phone', 'max_length') - remove_check_constraint(:verification_codes, constraint_phone) - add_check_constraint(:verification_codes, 'char_length(phone) <= 50', constraint_phone) - end - - def down - constraint_phone = check_constraint_name('verification_codes', 'phone', 'max_length') - remove_check_constraint(:verification_codes, constraint_phone) - add_check_constraint(:verification_codes, 'char_length(phone) <= 32', constraint_phone) - end -end |