Erlaube mehrere OTC-Zahlungsarten

This commit is contained in:
gitea_admin committed 2026-09-06 08:21:01 +02:00
1 parent 5fede22267
commit 99dd615f01
4 files changed
+97 -20

No files matched your search

+1
View File
@@ -12,6 +12,7 @@
8. `db/migrations/0008_shopify_sync_technical.sql`
9. `db/migrations/0013_virtual_shortage_lot_allocations.sql`
10. `db/migrations/0014_require_human_lot_activation.sql`
11. `db/migrations/0015_sales_order_payments.sql`
## Beispielausfuehrung
@@ -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);