impress/db/migrate/20240323234243_increase_limit_for_item_outfit_relationships_id.rb
Emi Matchu 07617fa34f Increase ID column limit for item_outfit_relationships
Ahh wow, we're finally at the point of having enough outfits to need to
increase this ID field!

I got an alert this morning that queries were failing with the MySQL error
"id out of range". I went and found that creating a new outfit still works if
it's empty, but fails once you try to add an item to it. So, I assume this is
the failing column!

Note that I'm writing this from my emergency Steam Deck workstation, and that
I didn't quite get MySQL set up on it yet (I just yolo ran this in
production), so we don't have the corresponding changes to `db/schema.rb` yet.
This might require another commit from my normal workstation later to
complete this change!
2024-03-24 11:09:40 +11:00

10 lines
320 B
Ruby

class IncreaseLimitForItemOutfitRelationshipsId < ActiveRecord::Migration[7.1]
def change
reversible do |direction|
change_table :item_outfit_relationships do |t|
direction.up { t.change :id, :integer, limit: 8 }
direction.down{ t.change :id, :integer, limit: 4 }
end
end
end
end