Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
04af7189
Commit
04af7189
authored
May 13, 2021
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split column and limit into separate migrations
Updated schema
parent
ff917971
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
13 deletions
+22
-13
db/migrate/20210512183309_add_body_to_findings_evidences_response.rb
...20210512183309_add_body_to_findings_evidences_response.rb
+4
-13
db/migrate/20210512183310_add_limit_to_findings_evidences_response_body.rb
...12183310_add_limit_to_findings_evidences_response_body.rb
+17
-0
db/schema_migrations/20210512183310
db/schema_migrations/20210512183310
+1
-0
No files found.
db/migrate/20210512183309_add_body_to_findings_evidences_response.rb
View file @
04af7189
# 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
db/migrate/20210512183310_add_limit_to_findings_evidences_response_body.rb
0 → 100644
View file @
04af7189
# 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
db/schema_migrations/20210512183310
0 → 100644
View file @
04af7189
d1e389755e4f5ed0075b07c5680eee5ae3557550071d14360ad3030e4c2d3ac1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment