discourse/db/migrate/20241101141701_alter_bookmarks_ids_to_bigint.rb
Bianca Nenciu 723dc1fa55
Dev fix some types (#29547)
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.

This was using a temporary plugin / test API to make tests pass. After
more careful consideration, we concluded that it is safe to alter the
tables directly.
2024-11-01 19:19:25 +02:00

12 lines
233 B
Ruby

# frozen_string_literal: true
class AlterBookmarksIdsToBigint < ActiveRecord::Migration[7.1]
def up
change_column :bookmarks, :bookmarkable_id, :bigint
end
def down
raise ActiveRecord::IrreversibleMigration
end
end