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

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

class AddReindexingQueue < Gitlab::Database::Migration[1.0]
  def change
    create_table :postgres_reindex_queued_actions do |t|
      t.text :index_identifier, null: false, limit: 255
      t.integer :state, limit: 2, null: false, default: 0
      t.timestamps_with_timezone null: false

      t.index :state
    end

    change_column_default :postgres_reindex_queued_actions, :created_at, from: nil, to: -> { 'NOW()' }
    change_column_default :postgres_reindex_queued_actions, :updated_at, from: nil, to: -> { 'NOW()' }
  end
end