From f47400a9b100061fe6a9c48b793e1772643dc874 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Thu, 10 Oct 2024 16:29:35 +0300 Subject: [PATCH] DEV: Fix mismatched column types (#240) 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. --- .../20241009160105_alter_customer_id_to_bigint.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20241009160105_alter_customer_id_to_bigint.rb diff --git a/db/migrate/20241009160105_alter_customer_id_to_bigint.rb b/db/migrate/20241009160105_alter_customer_id_to_bigint.rb new file mode 100644 index 00000000..297222e1 --- /dev/null +++ b/db/migrate/20241009160105_alter_customer_id_to_bigint.rb @@ -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