debian-mirror-gitlab/db/migrate/20200311165635_create_project_export_jobs.rb

22 lines
664 B
Ruby
Raw Normal View History

2020-04-08 14:13:33 +05:30
# frozen_string_literal: true
class CreateProjectExportJobs < ActiveRecord::Migration[6.0]
DOWNTIME = false
2020-05-24 23:13:21 +05:30
# rubocop:disable Migration/PreventStrings
2020-04-08 14:13:33 +05:30
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
2020-05-24 23:13:21 +05:30
# rubocop:enable Migration/PreventStrings
2020-04-08 14:13:33 +05:30
end