From b43d82d5d6016a7cce010827127ce9ff3b30cb65 Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Thu, 10 Oct 2024 16:29:37 +0300 Subject: [PATCH] DEV: Fix mismatched column types (#329) 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. --- db/migrate/20241009161603_alter_query_id_to_bigint.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20241009161603_alter_query_id_to_bigint.rb diff --git a/db/migrate/20241009161603_alter_query_id_to_bigint.rb b/db/migrate/20241009161603_alter_query_id_to_bigint.rb new file mode 100644 index 0000000..6368f47 --- /dev/null +++ b/db/migrate/20241009161603_alter_query_id_to_bigint.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AlterQueryIdToBigint < ActiveRecord::Migration[7.1] + def up + change_column :data_explorer_query_groups, :query_id, :bigint + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end