Skip to content

Commit

Permalink
feat: remove default
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomiguelpinto committed Dec 31, 2024
1 parent d0fc297 commit 37fc4f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class AddTotalPaidAmountCentsToInvoices < ActiveRecord::Migration[7.1]
disable_ddl_transaction!

def up
add_column :invoices, :total_paid_amount_cents, :bigint, null: true, default: 0
add_column :invoices, :total_paid_amount_cents, :bigint, null: true
# Backfill
Invoice.in_batches(of: 10_000).each do |batch|
batch.update_all(total_paid_amount_cents: 0) # rubocop:disable Rails/SkipsModelValidations
Expand Down

0 comments on commit 37fc4f4

Please sign in to comment.