add service
Some checks failed
Deploy Smart Search Backend / deploy (push) Failing after 1m54s

This commit is contained in:
vallyenfail
2026-01-17 20:41:37 +03:00
parent 635acd13ac
commit e2968722ed
70 changed files with 7542 additions and 463 deletions

View File

@@ -0,0 +1,10 @@
-- +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;