gitlab-org--gitlab-foss/db/migrate/20210602122213_add_upcoming_reconciliations.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
594 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddUpcomingReconciliations < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
def up
with_lock_retries do
create_table :upcoming_reconciliations do |t|
t.references :namespace, index: { unique: true }, null: true, foreign_key: { on_delete: :cascade }
t.date :next_reconciliation_date, null: false
t.date :display_alert_from, null: false
t.timestamps_with_timezone
end
end
end
def down
with_lock_retries do
drop_table :upcoming_reconciliations
end
end
end