debian-mirror-gitlab/db/migrate/20221121091238_add_work_item_progress.rb
2023-03-05 14:24:40 +05:30

18 lines
518 B
Ruby

# frozen_string_literal: true
class AddWorkItemProgress < Gitlab::Database::Migration[2.0]
enable_lock_retries!
def up
create_table :work_item_progresses, id: false do |t|
t.timestamps_with_timezone null: false
t.references :issue, primary_key: true, index: false, default: nil,
foreign_key: { on_delete: :cascade, to_table: :issues }
t.integer :progress, default: 0, limit: 2, null: false
end
end
def down
drop_table :work_item_progresses
end
end