提交 32c48ef7 编写于 作者: S Shinya Maeda

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

上级 a2e975f2
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册