minor
This commit is contained in:
6
db/70_prices.sql
Normal file
6
db/70_prices.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS prices (
|
||||
product_id UUID PRIMARY KEY REFERENCES products(id) ON DELETE CASCADE,
|
||||
currency CHAR(3) NOT NULL DEFAULT 'RUB',
|
||||
price NUMERIC(12, 2) NOT NULL CHECK (price >= 0),
|
||||
old_price NUMERIC(12, 2) NULL CHECK (old_price IS NULL OR old_price >= 0)
|
||||
);
|
||||
Reference in New Issue
Block a user