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

postgres_index.rb « database « gitlab « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8492b44c4046ef6b69aabde85685467de733d6cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

FactoryBot.define do
  factory :postgres_index, class: 'Gitlab::Database::PostgresIndex' do
    identifier { "public.some_index_#{indexrelid}" }
    sequence(:indexrelid) { |n| n }
    schema { 'public' }
    name { "some_index_#{indexrelid}" }
    tablename { 'foo' }
    unique { false }
    valid_index { true }
    partitioned { false }
    exclusion { false }
    expression { false }
    partial { false }
    definition { "CREATE INDEX #{identifier} ON #{tablename} (bar)" }
    ondisk_size_bytes { 100.megabytes }
  end
end