add service
All checks were successful
Deploy Smart Search Backend / deploy (push) Successful in 1m41s

This commit is contained in:
vallyenfail
2026-01-17 23:40:43 +03:00
parent 39d39ec3cd
commit 5487618019
8 changed files with 19 additions and 23 deletions

View File

@@ -1,10 +1,5 @@
-- +goose Up
ALTER TABLE users ADD CONSTRAINT balance_non_negative CHECK (balance >= 0);
ALTER TABLE invite_codes ADD CONSTRAINT used_count_non_negative CHECK (used_count >= 0);
ALTER TABLE invite_codes ADD CONSTRAINT used_count_within_limit CHECK (used_count <= can_be_used_count);
-- +goose Down
ALTER TABLE users DROP CONSTRAINT IF EXISTS balance_non_negative;
ALTER TABLE invite_codes DROP CONSTRAINT IF EXISTS used_count_non_negative;
ALTER TABLE invite_codes DROP CONSTRAINT IF EXISTS used_count_within_limit;
ALTER TABLE users DROP CONSTRAINT IF EXISTS balance_non_negative;