Increase the maximum value for pet types' color ID and species ID

Oh dang, we're on color #120 now, and looks like our maximum value is
127. Let's expand that!

I noticed this because I'm writing tests for some stuff, and used "456"
as a placeholder ID number, and it just fully did not work, and I'm
like. Oh.
This commit is contained in:
Emi Matchu 2024-11-15 19:29:13 -08:00
parent c5995a2bd1
commit dd213e8078
2 changed files with 20 additions and 3 deletions

View file

@ -0,0 +1,17 @@
class IncreasePetTypeColorIdAndSpeciesIdLimit < ActiveRecord::Migration[7.2]
def change
reversible do |direction|
change_table :pet_types do |t|
direction.up do
t.change :color_id, :integer, null: false
t.change :species_id, :integer, null: false
end
direction.down do
t.change :color_id, :integer, limit: 1, null: false
t.change :species_id, :integer, limit: 1, null: false
end
end
end
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2024_10_08_004715) do
ActiveRecord::Schema[7.2].define(version: 2024_11_16_031655) do
create_table "alt_styles", charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t|
t.integer "species_id", null: false
t.integer "color_id", null: false
@ -225,8 +225,8 @@ ActiveRecord::Schema[7.2].define(version: 2024_10_08_004715) do
end
create_table "pet_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t|
t.integer "color_id", limit: 1, null: false
t.integer "species_id", limit: 1, null: false
t.integer "color_id", null: false
t.integer "species_id", null: false
t.datetime "created_at", precision: nil, null: false
t.integer "body_id", limit: 2, null: false
t.string "image_hash", limit: 8