BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
61a73cad
Commit
61a73cad
authored
Nov 23, 2017
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of timestamps on untracked files table
`updated_at` is now unnecessary and `created_at` is less useful due to removing the tracked field.
parent
a9c868d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
prepare_untracked_uploads.rb
lib/gitlab/background_migration/prepare_untracked_uploads.rb
+2
-3
No files found.
lib/gitlab/background_migration/prepare_untracked_uploads.rb
View file @
61a73cad
...
...
@@ -42,7 +42,6 @@ module Gitlab
unless
UntrackedFile
.
connection
.
table_exists?
(
:untracked_files_for_uploads
)
UntrackedFile
.
connection
.
create_table
:untracked_files_for_uploads
do
|
t
|
t
.
string
:path
,
limit:
600
,
null:
false
t
.
timestamps_with_timezone
null:
false
t
.
index
:path
,
unique:
true
end
end
...
...
@@ -117,10 +116,10 @@ module Gitlab
def
table_columns_and_values_for_insert
(
file_paths
)
values
=
file_paths
.
map
do
|
file_path
|
ActiveRecord
::
Base
.
send
(
:sanitize_sql_array
,
[
'(?
, NOW(), NOW()
)'
,
file_path
])
# rubocop:disable GitlabSecurity/PublicSend
ActiveRecord
::
Base
.
send
(
:sanitize_sql_array
,
[
'(?)'
,
file_path
])
# rubocop:disable GitlabSecurity/PublicSend
end
.
join
(
', '
)
"
#{
UntrackedFile
.
table_name
}
(path
, created_at, updated_at
) VALUES
#{
values
}
"
"
#{
UntrackedFile
.
table_name
}
(path) VALUES
#{
values
}
"
end
def
postgresql?
...
...
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