Skip to content
Snippets Groups Projects

BG migration to fix incorrect job artifacts expire_at on self-managed

Merged Albert requested to merge 355833-migration-to-fix-incorrect-expire-at into master
2 files
+ 7
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -12,14 +12,14 @@ class AddTmpIndexJobArtifactsIdAndExpireAt < Gitlab::Database::Migration[2.0]
SQL
def up
return if Gitlab.com?
# return if Gitlab.com?
add_concurrent_index :ci_job_artifacts, [:id, :expire_at],
where: EXPIRE_AT_ON_22_MIDNIGHT_IN_TIMEZONE, name: INDEX_NAME
end
def down
return if Gitlab.com?
# return if Gitlab.com?
remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
end
Loading