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/20210720140841_create_postgres_async_indexes_table.rb')
-rw-r--r--db/migrate/20210720140841_create_postgres_async_indexes_table.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20210720140841_create_postgres_async_indexes_table.rb b/db/migrate/20210720140841_create_postgres_async_indexes_table.rb
new file mode 100644
index 00000000000..707367e5f6c
--- /dev/null
+++ b/db/migrate/20210720140841_create_postgres_async_indexes_table.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class CreatePostgresAsyncIndexesTable < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ def change
+ create_table_with_constraints :postgres_async_indexes do |t|
+ t.timestamps_with_timezone null: false
+
+ t.text :name, null: false
+ t.text :definition, null: false
+ t.text :table_name, null: false
+
+ t.text_limit :name, 63
+ t.text_limit :definition, 2048
+ t.text_limit :table_name, 63
+
+ t.index :name, unique: true
+ end
+ end
+end