feat(pokemon): enforce bidirectional opposite sync and hide opposite text

Add unique indexes and transactional sync for opposite configurations
Remove explicit opposite names and labels from Pokemon detail view
This commit is contained in:
2026-05-07 16:21:11 +08:00
parent 953b90eba1
commit 575597b146
6 changed files with 83 additions and 57 deletions

View File

@@ -1575,6 +1575,14 @@ BEGIN
END IF;
END $$;
CREATE UNIQUE INDEX IF NOT EXISTS environments_opposite_environment_unique_idx
ON environments(opposite_environment_id)
WHERE opposite_environment_id IS NOT NULL;
CREATE UNIQUE INDEX IF NOT EXISTS favorite_things_opposite_favorite_thing_unique_idx
ON favorite_things(opposite_favorite_thing_id)
WHERE opposite_favorite_thing_id IS NOT NULL;
UPDATE items
SET dyeability = CASE
WHEN dual_dyeable THEN 2