Erlaube mehrere OTC-Zahlungsarten
This commit is contained in:
1 parent
5fede22267
commit
99dd615f01
4 files changed
+97
-20
No files matched your search
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE sales_order_payment (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
sales_order_id BIGINT NOT NULL REFERENCES sales_order(id) ON DELETE CASCADE,
|
||||
payment_method_id BIGINT NOT NULL REFERENCES payment_method(id) ON DELETE RESTRICT,
|
||||
amount NUMERIC(14, 2) NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
CONSTRAINT chk_sales_order_payment_amount_positive CHECK (amount > 0)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_sales_order_payment_order ON sales_order_payment(sales_order_id);
|
||||
CREATE INDEX idx_sales_order_payment_method ON sales_order_payment(payment_method_id);
|
||||
Reference in new issue
Block a user