Add ingredieints

This commit is contained in:
Aditya Siregar
2025-08-08 00:22:28 +07:00
parent 93a3b29ae9
commit fe4f17b34d
22 changed files with 535 additions and 229 deletions
@@ -0,0 +1,3 @@
-- Revert payment status constraints to previous state
ALTER TABLE orders DROP CONSTRAINT IF EXISTS orders_payment_status_check;
ALTER TABLE orders ADD CONSTRAINT orders_payment_status_check CHECK (payment_status IN ('pending', 'completed', 'failed', 'refunded', 'partially_refunded'));
@@ -0,0 +1,3 @@
-- Update payment status constraints to include all defined statuses
ALTER TABLE orders DROP CONSTRAINT IF EXISTS orders_payment_status_check;
ALTER TABLE orders ADD CONSTRAINT orders_payment_status_check CHECK (payment_status IN ('pending', 'partial', 'completed', 'failed', 'refunded', 'partial-refunded'));
@@ -0,0 +1,3 @@
-- Remove deleted_at column from units table
DROP INDEX IF EXISTS idx_units_deleted_at;
ALTER TABLE units DROP COLUMN IF EXISTS deleted_at;
@@ -0,0 +1,3 @@
-- Add deleted_at column to units table for soft delete functionality
ALTER TABLE units ADD COLUMN deleted_at TIMESTAMP WITH TIME ZONE;
CREATE INDEX idx_units_deleted_at ON units(deleted_at);