Skip to content

Commit

Permalink
DEV: Fix mismatched column types (#240)
Browse files Browse the repository at this point in the history
The primary key is usually a bigint column, but the foreign key columns
are usually of integer type. This can lead to issues when joining these
columns due to mismatched types and different value ranges.
  • Loading branch information
nbianca authored Oct 10, 2024
1 parent eecb176 commit f47400a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions db/migrate/20241009160105_alter_customer_id_to_bigint.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

class AlterCustomerIdToBigint < ActiveRecord::Migration[7.1]
def up
change_column :discourse_subscriptions_subscriptions, :customer_id, :bigint
end

def down
raise ActiveRecord::IrreversibleMigration
end
end

0 comments on commit f47400a

Please sign in to comment.