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

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

class CreateProjectExportJobs < ActiveRecord::Migration[6.0]
  DOWNTIME = false

  def change
    create_table :project_export_jobs do |t|
      t.references :project, index: false, null: false, foreign_key: { on_delete: :cascade }
      t.timestamps_with_timezone null: false
      t.integer :status, limit: 2, null: false, default: 0
      t.string :jid, limit: 100, null: false, unique: true

      t.index [:project_id, :jid]
      t.index [:jid], unique: true
      t.index [:status]
      t.index [:project_id, :status]
    end
  end
end