feat(DRW-001) initial commit!
CI/CD / Build (push) Successful in 5m59s
CI/CD / Frontend Build (push) Successful in 1m27s
CI/CD / Unit Tests (push) Failing after 1m12s
CI/CD / Docker (push) Skipped
CI/CD / Frontend Docker (push) Failing after 3m29s

This commit is contained in:
kwiialyssa
2026-09-13 20:37:48 +03:00
commit edb4cd8613
59 changed files with 8669 additions and 0 deletions
@@ -0,0 +1,11 @@
ALTER TABLE items ADD COLUMN min_grade SMALLINT;
ALTER TABLE items ADD COLUMN max_grade SMALLINT;
-- Backfill any existing shop rows to grade 1-1 (a normal single-grade item)
-- before the constraint below starts requiring it.
UPDATE items SET min_grade = 1, max_grade = 1 WHERE source = 'shop';
ALTER TABLE items ADD CONSTRAINT grade_matches_source CHECK (
(source = 'shop' AND min_grade >= 1 AND max_grade >= min_grade)
OR (source = 'neutral' AND min_grade IS NULL AND max_grade IS NULL)
);