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

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

class CreatePostgresAsyncForeignKeyValidations < Gitlab::Database::Migration[2.1]
  def change
    create_table :postgres_async_foreign_key_validations, if_not_exists: true do |t|
      t.timestamps_with_timezone null: false

      t.text :name, null: false, limit: 63
      t.text :table_name, null: false, limit: 63
      t.text :last_error, limit: 10_000

      t.integer :attempts, null: false, default: 0

      t.index :name, unique: true
    end
  end
end