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

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

class CreateZoektEnabledNamespaces < Gitlab::Database::Migration[2.2]
  milestone '16.8'

  UNIQUE_ROOT_NAMESPACE_ID_INDEX_NAME = 'unique_zoekt_enabled_namespaces_on_root_namespace_id'
  SEARCH_INDEX_NAME = 'index_zoekt_enabled_namespaces_on_search'

  def change
    create_table :zoekt_enabled_namespaces do |t|
      t.bigint :root_namespace_id, null: false
      t.timestamps_with_timezone null: false
      t.boolean :search, null: false, default: true

      t.index :root_namespace_id, unique: true, name: UNIQUE_ROOT_NAMESPACE_ID_INDEX_NAME, using: :btree
    end
  end
end