Commit 2f5f1fd5 authored by Tiger Watson's avatar Tiger Watson

Merge branch '220420-migration-validate-designs-filename-text-limit' into 'master'

Validate text limit on designs.filename

See merge request gitlab-org/gitlab!43952
parents d9cacdc2 9f2a3189
---
title: Add migration to validate design_management_designs.filename text limit constraint
merge_request: 43952
author:
type: other
# frozen_string_literal: true
class ValidateDesignsFilenameTextLimit < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
validate_text_limit :design_management_designs, :filename
end
def down
# no-op
end
end
a581071767c5484e8286951854b0effe04d4b8951f208f10ceb4812940363959
\ No newline at end of file
......@@ -11437,7 +11437,8 @@ CREATE TABLE design_management_designs (
project_id integer NOT NULL,
issue_id integer,
filename character varying NOT NULL,
relative_position integer
relative_position integer,
CONSTRAINT check_07155e2715 CHECK ((char_length((filename)::text) <= 255))
);
CREATE SEQUENCE design_management_designs_id_seq
......@@ -18198,9 +18199,6 @@ ALTER TABLE ONLY chat_names
ALTER TABLE ONLY chat_teams
ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id);
ALTER TABLE design_management_designs
ADD CONSTRAINT check_07155e2715 CHECK ((char_length((filename)::text) <= 255)) NOT VALID;
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
......
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