Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
added quantity check
Browse files Browse the repository at this point in the history
  • Loading branch information
dvalnn committed May 29, 2024
1 parent cc8f35b commit 6c48c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrations/003_orders.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS orders (
client_id uuid NOT NULL REFERENCES clients(id),
number int NOT NULL CHECK (number> 0),
piece piece_kind NOT NULL REFERENCES pieces(code),
quantity int NOT NULL CHECK (quantity > 0),
quantity int NOT NULL CHECK (quantity > 0 AND quantity <= 24),
due_date int NOT NULL CHECK (due_date > 0),
late_penalty money NOT NULL,
early_penalty money NOT NULL,
Expand Down

0 comments on commit 6c48c0e

Please sign in to comment.