Files
smart-search-back/migrations/00008_add_balance_check_constraint.sql
vallyenfail 5487618019
All checks were successful
Deploy Smart Search Backend / deploy (push) Successful in 1m41s
add service
2026-01-17 23:40:43 +03:00

5 lines
170 B
SQL

-- +goose Up
ALTER TABLE users ADD CONSTRAINT balance_non_negative CHECK (balance >= 0);
-- +goose Down
ALTER TABLE users DROP CONSTRAINT IF EXISTS balance_non_negative;