diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index 7246c52..321fb7b 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -1490,6 +1490,7 @@ export type Database = { description: string | null id: string name: string + pricing_type: string sort_order: number updated_at: string } @@ -1503,6 +1504,7 @@ export type Database = { description?: string | null id?: string name: string + pricing_type?: string sort_order?: number updated_at?: string } @@ -1516,6 +1518,7 @@ export type Database = { description?: string | null id?: string name?: string + pricing_type?: string sort_order?: number updated_at?: string } diff --git a/supabase/migrations/20260419154537_4a5c5615-6f4e-4ae3-bd8e-561943247c3b.sql b/supabase/migrations/20260419154537_4a5c5615-6f4e-4ae3-bd8e-561943247c3b.sql new file mode 100644 index 0000000..7bc0700 --- /dev/null +++ b/supabase/migrations/20260419154537_4a5c5615-6f4e-4ae3-bd8e-561943247c3b.sql @@ -0,0 +1,9 @@ +ALTER TABLE public.fee_schedule_items + ADD COLUMN IF NOT EXISTS pricing_type text NOT NULL DEFAULT 'hourly'; + +ALTER TABLE public.fee_schedule_items + DROP CONSTRAINT IF EXISTS fee_schedule_items_pricing_type_check; + +ALTER TABLE public.fee_schedule_items + ADD CONSTRAINT fee_schedule_items_pricing_type_check + CHECK (pricing_type IN ('hourly', 'flat')); \ No newline at end of file