Skip to content
Snippets Groups Projects
Commit 32c48ef7 authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Specify length of indexed column. (This is neccessary for TEXT type)

parent a2e975f2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -9,10 +9,10 @@ class AddIndexToCiBuildsArtifactsFile < ActiveRecord::Migration
# We add an temporary index to `ci_builds.artifacts_file` column to avoid statements timeout in legacy artifacts migrations
# This index is to be removed after we have cleaned up background migrations
# https://gitlab.com/gitlab-org/gitlab-ce/issues/46866
add_concurrent_index :ci_builds, :artifacts_file, where: "artifacts_file <> ''"
add_concurrent_index :ci_builds, :artifacts_file, where: "artifacts_file <> ''", length: 65535
end
 
def down
remove_concurrent_index :ci_builds, :artifacts_file, where: "artifacts_file <> ''"
remove_concurrent_index :ci_builds, :artifacts_file, where: "artifacts_file <> ''", length: 65535
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment