feat(orders): a fifth verdict, 'bad', between ok and never again
ci / lint-test (push) Successful in 47s
ci / lint-test (push) Successful in 47s
The jump from "OK" to "Never again" is too big and most disappointments live in the gap (user, 2026-07-28) — so a merely poor meal either flattered itself as OK or got blacklisted. Only 'never' raises the warning on a future order. A blacklist that fires for every mediocre delivery is one nobody reads, so 'bad' records the disappointment without triggering the alarm. Both set order_again = false — you would not choose either again — and that split between "would I order it" and "warn me about it" is the point of the extra level. Migration widens the CHECK; nothing is removed, so no existing row needs mapping.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- A fifth verdict: "bad", between "ok" and "never".
|
||||
--
|
||||
-- "OK" to "Never again" is a big jump and most disappointments live in the gap
|
||||
-- (user, 2026-07-28). Without it, a merely poor meal either flatters itself as
|
||||
-- OK or gets blacklisted, and the blacklist is the signal that has to stay
|
||||
-- sharp — `warn` remains exclusive to 'never' so it is not diluted by every
|
||||
-- mediocre delivery.
|
||||
--
|
||||
-- Safe as a straight widening: no existing row uses a value being removed,
|
||||
-- because nothing is being removed.
|
||||
ALTER TABLE order_reviews DROP CONSTRAINT IF EXISTS chk_order_review_rating;
|
||||
|
||||
ALTER TABLE order_reviews ADD CONSTRAINT chk_order_review_rating
|
||||
CHECK (rating IS NULL OR rating IN ('loved', 'liked', 'ok', 'bad', 'never'));
|
||||
Reference in New Issue
Block a user