diff options
Diffstat (limited to 'spec/factories/gitlab/database/async_indexes/postgres_async_index.rb')
-rw-r--r-- | spec/factories/gitlab/database/async_indexes/postgres_async_index.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/factories/gitlab/database/async_indexes/postgres_async_index.rb b/spec/factories/gitlab/database/async_indexes/postgres_async_index.rb new file mode 100644 index 00000000000..d6b4b90bbd0 --- /dev/null +++ b/spec/factories/gitlab/database/async_indexes/postgres_async_index.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :postgres_async_index, class: 'Gitlab::Database::AsyncIndexes::PostgresAsyncIndex' do + sequence(:name) { |n| "users_id_#{n}" } + definition { "CREATE INDEX #{name} ON #{table_name} (id)" } + table_name { "users" } + end +end |