debian-mirror-gitlab/db/migrate/20200922133949_create_bulk_import.rb
2021-01-30 21:13:32 +05:30

26 lines
582 B
Ruby

# frozen_string_literal: true
class CreateBulkImport < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
create_table :bulk_imports do |t|
t.references :user, type: :integer, index: true, null: false, foreign_key: { on_delete: :cascade }
t.integer :source_type, null: false, limit: 2
t.integer :status, null: false, limit: 2
t.timestamps_with_timezone
end
end
end
def down
with_lock_retries do
drop_table :bulk_imports
end
end
end