mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
Add ACMCC app source, Supabase backend, and project config
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
ALTER TABLE public.bill_approvals
|
||||
ADD COLUMN IF NOT EXISTS bill_id UUID;
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM information_schema.table_constraints
|
||||
WHERE constraint_schema = 'public'
|
||||
AND table_name = 'bill_approvals'
|
||||
AND constraint_name = 'bill_approvals_bill_id_fkey'
|
||||
) THEN
|
||||
ALTER TABLE public.bill_approvals
|
||||
ADD CONSTRAINT bill_approvals_bill_id_fkey
|
||||
FOREIGN KEY (bill_id)
|
||||
REFERENCES public.bills(id)
|
||||
ON DELETE CASCADE;
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_bill_approvals_bill_id
|
||||
ON public.bill_approvals (bill_id);
|
||||
Reference in New Issue
Block a user