Commit 1d5d57cc authored by Michael Kozono's avatar Michael Kozono
Browse files

Fix datetime inserts on MySQL

parent 5707f84f5f38
......@@ -124,10 +124,8 @@ def insert_file_paths(file_paths)
def table_columns_and_values_for_insert(file_paths)
timestamp =
values = do |file_path|
ActiveRecord::Base.send(:sanitize_sql_array, ['(?, ?, ?)', file_path, timestamp, timestamp]) # rubocop:disable GitlabSecurity/PublicSend
ActiveRecord::Base.send(:sanitize_sql_array, ['(?, NOW(), NOW())', file_path]) # rubocop:disable GitlabSecurity/PublicSend
end.join(', ')
"#{UntrackedFile.table_name} (path, created_at, updated_at) VALUES #{values}"
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