diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index a14d4eb..83e55c5 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -185,6 +185,7 @@ export type Database = { } cases: { Row: { + archived_at: string | null assigned_attorney_id: string | null case_caption: string | null case_number: string @@ -221,6 +222,7 @@ export type Database = { updated_at: string } Insert: { + archived_at?: string | null assigned_attorney_id?: string | null case_caption?: string | null case_number: string @@ -257,6 +259,7 @@ export type Database = { updated_at?: string } Update: { + archived_at?: string | null assigned_attorney_id?: string | null case_caption?: string | null case_number?: string @@ -356,6 +359,7 @@ export type Database = { address_line1: string | null address_line2: string | null annual_interest_rate: number | null + archived_at: string | null board_members: Json city: string | null client_type: Database["public"]["Enums"]["client_type"] @@ -378,6 +382,7 @@ export type Database = { address_line1?: string | null address_line2?: string | null annual_interest_rate?: number | null + archived_at?: string | null board_members?: Json city?: string | null client_type?: Database["public"]["Enums"]["client_type"] @@ -400,6 +405,7 @@ export type Database = { address_line1?: string | null address_line2?: string | null annual_interest_rate?: number | null + archived_at?: string | null board_members?: Json city?: string | null client_type?: Database["public"]["Enums"]["client_type"] @@ -786,6 +792,7 @@ export type Database = { Row: { address_line1: string | null address_line2: string | null + archived_at: string | null city: string | null company: string | null contact_type: string @@ -805,6 +812,7 @@ export type Database = { Insert: { address_line1?: string | null address_line2?: string | null + archived_at?: string | null city?: string | null company?: string | null contact_type?: string @@ -824,6 +832,7 @@ export type Database = { Update: { address_line1?: string | null address_line2?: string | null + archived_at?: string | null city?: string | null company?: string | null contact_type?: string @@ -1447,6 +1456,7 @@ export type Database = { homeowners: { Row: { address: string | null + archived_at: string | null client_id: string created_at: string created_by: string | null @@ -1463,6 +1473,7 @@ export type Database = { } Insert: { address?: string | null + archived_at?: string | null client_id: string created_at?: string created_by?: string | null @@ -1479,6 +1490,7 @@ export type Database = { } Update: { address?: string | null + archived_at?: string | null client_id?: string created_at?: string created_by?: string | null diff --git a/supabase/migrations/20260418014040_ad9b0c93-2adf-460b-9868-857319a7a19d.sql b/supabase/migrations/20260418014040_ad9b0c93-2adf-460b-9868-857319a7a19d.sql new file mode 100644 index 0000000..8cefb10 --- /dev/null +++ b/supabase/migrations/20260418014040_ad9b0c93-2adf-460b-9868-857319a7a19d.sql @@ -0,0 +1,10 @@ +-- Add archived_at to the four entity tables +ALTER TABLE public.clients ADD COLUMN archived_at timestamptz; +ALTER TABLE public.cases ADD COLUMN archived_at timestamptz; +ALTER TABLE public.contacts ADD COLUMN archived_at timestamptz; +ALTER TABLE public.homeowners ADD COLUMN archived_at timestamptz; + +CREATE INDEX idx_clients_archived_at ON public.clients (archived_at); +CREATE INDEX idx_cases_archived_at ON public.cases (archived_at); +CREATE INDEX idx_contacts_archived_at ON public.contacts (archived_at); +CREATE INDEX idx_homeowners_archived_at ON public.homeowners (archived_at); \ No newline at end of file