diff options
Diffstat (limited to 'db/migrate/20211011140930_create_ci_namespace_mirrors.rb')
-rw-r--r-- | db/migrate/20211011140930_create_ci_namespace_mirrors.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20211011140930_create_ci_namespace_mirrors.rb b/db/migrate/20211011140930_create_ci_namespace_mirrors.rb new file mode 100644 index 00000000000..b9a708c5d7b --- /dev/null +++ b/db/migrate/20211011140930_create_ci_namespace_mirrors.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class CreateCiNamespaceMirrors < Gitlab::Database::Migration[1.0] + TABLE_NAME = :ci_namespace_mirrors + INDEX_NAME = "index_gin_#{TABLE_NAME}_on_traversal_ids" + + def change + create_table TABLE_NAME do |t| + t.integer :namespace_id, null: false, index: { unique: true } + t.integer :traversal_ids, array: true, default: [], null: false + + t.index :traversal_ids, name: INDEX_NAME, using: :gin + end + end +end |