unfinished purchase

This commit is contained in:
ragilap
2025-11-05 18:58:06 +07:00
parent 4aed480662
commit 8f74391f1e
23 changed files with 1155 additions and 52 deletions
@@ -0,0 +1,14 @@
DO $$
BEGIN
IF EXISTS (
SELECT 1
FROM pg_constraint
WHERE conname = 'fk_purchase_items_purchase'
AND conrelid = 'purchase_items'::regclass
) THEN
ALTER TABLE purchase_items
DROP CONSTRAINT fk_purchase_items_purchase;
END IF;
END $$;
DROP TABLE IF EXISTS purchases;