From f11a2858b4ee940d20ec3a6e0300c27d569c13bc Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 22:01:32 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/integrations/supabase/types.ts | 6 ++++++ ...0260419220129_9fa525a9-b364-4866-bd89-d4d1da029d08.sql | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 supabase/migrations/20260419220129_9fa525a9-b364-4866-bd89-d4d1da029d08.sql 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