debian-mirror-gitlab/db/migrate/20200824124623_create_issuable_severities.rb
2020-11-24 15:15:51 +05:30

22 lines
553 B
Ruby

# frozen_string_literal: true
class CreateIssuableSeverities < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
create_table :issuable_severities do |t|
t.references :issue, index: { unique: true }, null: false, foreign_key: { on_delete: :cascade }
t.integer :severity, null: false, default: 0, limit: 2 # 0 - will stand for unknown
end
end
end
def down
with_lock_retries do
drop_table :issuable_severities
end
end
end