Commit 6e8aa522 authored by Steve Abrams's avatar Steve Abrams

Merge branch 'jh-404-alter-phone-constraint-bigger' into 'master'

Alter phone constraint bigger

See merge request gitlab-org/gitlab!76516
parents 4bdf27ff 74d33307
# 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
# frozen_string_literal: true
class ChangeUserDetailsPhoneTextLimit < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
def up
remove_text_limit :user_details, :phone
add_text_limit :user_details, :phone, 50
end
def down
remove_text_limit :user_details, :phone
add_text_limit :user_details, :phone, 32
end
end
d39b46bfd4bdf81cd4969190d08dce2260b4f476564a2e6c3e05d69b87c1c6df
\ No newline at end of file
6d62200480e46b356fe07eeb2c99b0fb441dadd00faf30079722c617facab7cc
\ No newline at end of file
......@@ -166,7 +166,7 @@ CREATE TABLE verification_codes (
phone text NOT NULL,
CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 32))
CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
)
PARTITION BY RANGE (created_at);
......@@ -20223,7 +20223,7 @@ CREATE TABLE user_details (
registration_objective smallint,
phone text,
CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)),
CONSTRAINT check_a73b398c60 CHECK ((char_length(phone) <= 32)),
CONSTRAINT check_a73b398c60 CHECK ((char_length(phone) <= 50)),
CONSTRAINT check_b132136b01 CHECK ((char_length(other_role) <= 100)),
CONSTRAINT check_eeeaf8d4f0 CHECK ((char_length(pronouns) <= 50)),
CONSTRAINT check_f932ed37db CHECK ((char_length(pronunciation) <= 255))
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