almost ready

This commit is contained in:
bob
2026-06-01 10:52:06 -05:00
parent 8b0eb0db78
commit 763305ca89
94 changed files with 8766 additions and 2674 deletions

View File

@@ -20,12 +20,12 @@
SET search_path = skintracker;
INSERT INTO skin_conditions (skin_id, condition, min_float, max_float)
INSERT INTO skin_conditions (skin_id, condition, float_min, float_max)
SELECT
s.id,
t.name,
GREATEST(s.float_min, t.lo) AS min_float, -- clamp the tier to the skin's range
LEAST(s.float_max, t.hi) AS max_float
GREATEST(s.float_min, t.lo) AS float_min, -- clamp the tier to the skin's range
LEAST(s.float_max, t.hi) AS float_max
FROM skins s
CROSS JOIN (VALUES
('Factory New', 0.00, 0.07),
@@ -51,9 +51,9 @@ ORDER BY s.id, t.lo;
-- Sanity checks (optional)
-- ------------------------------------------------------------
-- Rows per condition:
-- SELECT condition, count(*) FROM skin_conditions GROUP BY condition ORDER BY min(min_float);
-- SELECT condition, count(*) FROM skin_conditions GROUP BY condition ORDER BY min(float_min);
--
-- Spot-check a capped skin (e.g. an Asiimov) shows clamped FT bounds:
-- SELECT s.name, sc.condition, sc.min_float, sc.max_float
-- SELECT s.name, sc.condition, sc.float_min, sc.float_max
-- FROM skin_conditions sc JOIN skins s ON s.id = sc.skin_id
-- WHERE s.name ILIKE 'Asiimov' ORDER BY sc.min_float;
-- WHERE s.name ILIKE 'Asiimov' ORDER BY sc.float_min;