Deterministic fixture UUIDs

This commit is contained in:
Kevin McConnell
2025-11-12 12:28:29 +00:00
committed by Mike Dalessio
parent 1959e15f7e
commit 63f8a9af78
5 changed files with 58 additions and 5 deletions
+3 -2
View File
@@ -80,8 +80,9 @@ module FixturesTestHelper
label = label.to_s.delete_suffix("_uuid")
end
return super(label, column_type) unless column_type == :uuid
UuidPrimaryKey.uuid_to_base36(super(label, column_type))
# Rails passes :string for varchar columns, so handle both :uuid and :string
return super(label, column_type) unless column_type.in?([:uuid, :string])
UuidPrimaryKey.generate_fixture_uuid(label)
end
end
end