debian-mirror-gitlab/db/migrate/20210429131525_create_user_credit_card_validations.rb
2021-06-08 01:23:25 +05:30

22 lines
585 B
Ruby

# frozen_string_literal: true
class CreateUserCreditCardValidations < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
with_lock_retries do
create_table :user_credit_card_validations, id: false do |t|
t.references :user, foreign_key: { on_delete: :cascade }, index: false, primary_key: true, default: nil
t.datetime_with_timezone :credit_card_validated_at, null: false
end
end
end
def down
with_lock_retries do
drop_table :user_credit_card_validations
end
end
end