revert(lookup): restore PARTITION BY group; tests now track data fix
Reverts the PARTITION BY name change — group is the correct dedup key. Partitioning by name broke country deduplication (two US records both survived, causing Svelte each_key_duplicate on alpha_2_code='US'). Root cause is bad seed data in lu_v3_time_zone: group='United States' for 13 US/* zones and group='Europe' for 63 Europe/* zones instead of group=name. A separate DB UPDATE is required to fix those rows. Tests updated to assert: - No duplicate alpha_2_code in country list (PARTITION BY group regression) - All 13 US/* and Europe/* spot-check zones present (pending DB data fix) - priority-only timezone count == 72 (pending DB data fix) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ def get_lookup_list_v3(
|
||||
SELECT * FROM (
|
||||
SELECT *,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY `name`
|
||||
PARTITION BY `group`
|
||||
ORDER BY
|
||||
(for_type = :for_type AND for_id = :for_id) DESC,
|
||||
(account_id = :account_id) DESC,
|
||||
|
||||
Reference in New Issue
Block a user