This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 0f31ada2 authored by Michael Kozono's avatar Michael Kozono
Browse files

Refactor

parent eb50a12a5031
......@@ -44,16 +44,10 @@ def ensure_temporary_tracking_table_exists
t.string :path, limit: 600, null: false
t.boolean :tracked, default: false, null: false
t.timestamps_with_timezone null: false
t.index :path, unique: true
t.index :tracked
end
end
unless UntrackedFile.connection.index_exists?(:untracked_files_for_uploads, :path)
UntrackedFile.connection.add_index :untracked_files_for_uploads, :path, unique: true
end
unless UntrackedFile.connection.index_exists?(:untracked_files_for_uploads, :tracked)
UntrackedFile.connection.add_index :untracked_files_for_uploads, :tracked
end
end
def clear_untracked_file_paths
......@@ -140,8 +134,7 @@ def can_bulk_insert_and_ignore_duplicates?
end
def postgresql_pre_9_5?
@postgresql_pre_9_5 ||= postgresql? &&
ActiveRecord::Base.connection.select_value('SHOW server_version_num').to_i < 90500
@postgresql_pre_9_5 ||= postgresql? && Gitlab::Database.version.to_f < 9.5
end
def schedule_populate_untracked_uploads_jobs
......
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