diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index 229b2b4..4947872 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -1497,6 +1497,7 @@ export type Database = { Row: { amount: number billable: boolean + billed: boolean case_id: string created_at: string description: string @@ -1511,6 +1512,7 @@ export type Database = { Insert: { amount: number billable?: boolean + billed?: boolean case_id: string created_at?: string description: string @@ -1525,6 +1527,7 @@ export type Database = { Update: { amount?: number billable?: boolean + billed?: boolean case_id?: string created_at?: string description?: string @@ -2911,6 +2914,7 @@ export type Database = { time_entries: { Row: { billable: boolean + billed: boolean case_id: string created_at: string description: string @@ -2925,6 +2929,7 @@ export type Database = { } Insert: { billable?: boolean + billed?: boolean case_id: string created_at?: string description: string @@ -2939,6 +2944,7 @@ export type Database = { } Update: { billable?: boolean + billed?: boolean case_id?: string created_at?: string description?: string diff --git a/supabase/migrations/20260419220129_9fa525a9-b364-4866-bd89-d4d1da029d08.sql b/supabase/migrations/20260419220129_9fa525a9-b364-4866-bd89-d4d1da029d08.sql new file mode 100644 index 0000000..956be12 --- /dev/null +++ b/supabase/migrations/20260419220129_9fa525a9-b364-4866-bd89-d4d1da029d08.sql @@ -0,0 +1,8 @@ +ALTER TABLE public.time_entries + ADD COLUMN IF NOT EXISTS billed boolean NOT NULL DEFAULT false; + +ALTER TABLE public.expenses + ADD COLUMN IF NOT EXISTS billed boolean NOT NULL DEFAULT false; + +UPDATE public.time_entries SET billed = true WHERE invoice_id IS NOT NULL AND billed = false; +UPDATE public.expenses SET billed = true WHERE invoice_id IS NOT NULL AND billed = false; \ No newline at end of file