Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20230523074248_validate_async_index_table_name_length_constraint.rb')
-rw-r--r--db/migrate/20230523074248_validate_async_index_table_name_length_constraint.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20230523074248_validate_async_index_table_name_length_constraint.rb b/db/migrate/20230523074248_validate_async_index_table_name_length_constraint.rb
new file mode 100644
index 00000000000..5b7d74d7db9
--- /dev/null
+++ b/db/migrate/20230523074248_validate_async_index_table_name_length_constraint.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ValidateAsyncIndexTableNameLengthConstraint < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ validate_text_limit :postgres_async_indexes, :table_name, constraint_name: 'check_schema_and_name_length'
+ end
+
+ def down
+ # no-op because we cannot invalidate a constraint
+ end
+end