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
7f1bf091
Commit
7f1bf091
authored
Dec 03, 2021
by
Maxime Orefice
Committed by
Krasimir Angelov
Dec 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add original_filename to CiJobArtifact
parent
30cfc3c3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
1 deletion
+38
-1
app/models/ci/job_artifact.rb
app/models/ci/job_artifact.rb
+4
-0
db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb
...20211119085015_add_orignal_filename_to_ci_job_artifact.rb
+16
-0
db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb
...85036_add_text_limit_to_job_artifact_original_filename.rb
+13
-0
db/schema_migrations/20211119085015
db/schema_migrations/20211119085015
+1
-0
db/schema_migrations/20211119085036
db/schema_migrations/20211119085036
+1
-0
db/structure.sql
db/structure.sql
+3
-1
No files found.
app/models/ci/job_artifact.rb
View file @
7f1bf091
...
...
@@ -2,6 +2,7 @@
module
Ci
class
JobArtifact
<
Ci
::
ApplicationRecord
include
IgnorableColumns
include
AfterCommitQueue
include
ObjectStorage
::
BackgroundMove
include
UpdateProjectStatistics
...
...
@@ -120,6 +121,9 @@ module Ci
belongs_to
:project
belongs_to
:job
,
class_name:
"Ci::Build"
,
foreign_key: :job_id
# We will start using this column once we complete https://gitlab.com/gitlab-org/gitlab/-/issues/285597
ignore_column
:original_filename
,
remove_with:
'14.7'
,
remove_after:
'2022-11-22'
mount_file_store_uploader
JobArtifactUploader
skip_callback
:save
,
:after
,
:store_file!
,
if: :store_after_commit?
...
...
db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb
0 → 100644
View file @
7f1bf091
# frozen_string_literal: true
class
AddOrignalFilenameToCiJobArtifact
<
Gitlab
::
Database
::
Migration
[
1.0
]
enable_lock_retries!
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20211119085036_add_text_limit_to_job_artifact_original_filename.rb
def
up
add_column
:ci_job_artifacts
,
:original_filename
,
:text
end
# rubocop:enable Migration/AddLimitToTextColumns
def
down
remove_column
:ci_job_artifacts
,
:original_filename
,
:text
end
end
db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb
0 → 100644
View file @
7f1bf091
# frozen_string_literal: true
class
AddTextLimitToJobArtifactOriginalFilename
<
Gitlab
::
Database
::
Migration
[
1.0
]
disable_ddl_transaction!
def
up
add_text_limit
:ci_job_artifacts
,
:original_filename
,
512
end
def
down
remove_text_limit
:ci_job_artifacts
,
:original_filename
end
end
db/schema_migrations/20211119085015
0 → 100644
View file @
7f1bf091
88b289d724f98f75e0340cde4c6e2bc3cb55df2a979934fb2bc544d22e4c032d
\ No newline at end of file
db/schema_migrations/20211119085036
0 → 100644
View file @
7f1bf091
2b2c28e0370ae1bb84bee5ff769c9b313902d1f1afc50fa54e23a1627b1121f3
\ No newline at end of file
db/structure.sql
View file @
7f1bf091
...
...
@@ -11699,7 +11699,9 @@ CREATE TABLE ci_job_artifacts (
id bigint NOT NULL,
job_id bigint NOT NULL,
locked smallint DEFAULT 2,
CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL))
original_filename text,
CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)),
CONSTRAINT check_85573000db CHECK ((char_length(original_filename) <= 512))
);
CREATE SEQUENCE ci_job_artifacts_id_seq
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