Commit 61a73cad authored by Michael Kozono's avatar Michael Kozono

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
No related merge requests found
......@@ -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?
......
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