Commit 04af7189 authored by Jonathan Schafer's avatar Jonathan Schafer

Split column and limit into separate migrations

Updated schema
parent ff917971
# frozen_string_literal: true # frozen_string_literal: true
class AddBodyToFindingsEvidencesResponse < ActiveRecord::Migration[6.0] class AddBodyToFindingsEvidencesResponse < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers # rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20210512183310_add_limit_to_findings_evidences_response_body.rb
DOWNTIME = false def change
disable_ddl_transaction!
def up
add_column :vulnerability_finding_evidence_responses, :body, :text add_column :vulnerability_finding_evidence_responses, :body, :text
add_text_limit :vulnerability_finding_evidence_responses, :body, 2048
end
def down
remove_column :vulnerability_finding_evidence_responses, :body
end end
# rubocop:enable Migration/AddLimitToTextColumns
end end
# frozen_string_literal: true
class AddLimitToFindingsEvidencesResponseBody < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_text_limit :vulnerability_finding_evidence_responses, :body, 2048
end
def down
remove_text_limit :vulnerability_finding_evidence_responses, :body
end
end
d1e389755e4f5ed0075b07c5680eee5ae3557550071d14360ad3030e4c2d3ac1
\ No newline at end of file
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