You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
17
+
"event_name"varchar(255) NOT NULL,
18
+
"event_type"varchar(100) NOT NULL,
19
+
"event_timestamp"timestamp with time zoneNOT NULL,
20
+
"target_criteria" jsonb NOT NULL,
21
+
"created_at"timestamp with time zone DEFAULT now() NOT NULL
22
+
);
23
+
--> statement-breakpoint
24
+
CREATETABLE "retention_labels" (
25
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
26
+
"name"varchar(255) NOT NULL,
27
+
"retention_period_days"integerNOT NULL,
28
+
"description"text,
29
+
"created_at"timestamp with time zone DEFAULT now() NOT NULL
30
+
);
31
+
--> statement-breakpoint
32
+
ALTERTABLE"legal_holds" DROP CONSTRAINT"legal_holds_custodian_id_custodians_id_fk";
33
+
--> statement-breakpoint
34
+
ALTERTABLE"legal_holds" DROP CONSTRAINT"legal_holds_case_id_ediscovery_cases_id_fk";
35
+
--> statement-breakpoint
36
+
ALTERTABLE"legal_holds" ALTER COLUMN "case_id" DROP NOT NULL;--> statement-breakpoint
37
+
ALTERTABLE"legal_holds" ADD COLUMN "name"varchar(255) NOT NULL;--> statement-breakpoint
38
+
ALTERTABLE"legal_holds" ADD COLUMN "is_active"boolean DEFAULT true NOT NULL;--> statement-breakpoint
39
+
ALTERTABLE"legal_holds" ADD COLUMN "created_at"timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
40
+
ALTERTABLE"legal_holds" ADD COLUMN "updated_at"timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
41
+
ALTERTABLE"email_legal_holds" ADD CONSTRAINT"email_legal_holds_email_id_archived_emails_id_fk"FOREIGN KEY ("email_id") REFERENCES"public"."archived_emails"("id") ON DELETE cascadeONUPDATE no action;--> statement-breakpoint
42
+
ALTERTABLE"email_legal_holds" ADD CONSTRAINT"email_legal_holds_legal_hold_id_legal_holds_id_fk"FOREIGN KEY ("legal_hold_id") REFERENCES"public"."legal_holds"("id") ON DELETE cascadeONUPDATE no action;--> statement-breakpoint
43
+
ALTERTABLE"email_retention_labels" ADD CONSTRAINT"email_retention_labels_email_id_archived_emails_id_fk"FOREIGN KEY ("email_id") REFERENCES"public"."archived_emails"("id") ON DELETE cascadeONUPDATE no action;--> statement-breakpoint
44
+
ALTERTABLE"email_retention_labels" ADD CONSTRAINT"email_retention_labels_label_id_retention_labels_id_fk"FOREIGN KEY ("label_id") REFERENCES"public"."retention_labels"("id") ON DELETE cascadeONUPDATE no action;--> statement-breakpoint
45
+
ALTERTABLE"email_retention_labels" ADD CONSTRAINT"email_retention_labels_applied_by_user_id_users_id_fk"FOREIGN KEY ("applied_by_user_id") REFERENCES"public"."users"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
46
+
ALTERTABLE"legal_holds" ADD CONSTRAINT"legal_holds_case_id_ediscovery_cases_id_fk"FOREIGN KEY ("case_id") REFERENCES"public"."ediscovery_cases"("id") ON DELETEsetnullONUPDATE no action;--> statement-breakpoint
47
+
ALTERTABLE"legal_holds" DROP COLUMN "custodian_id";--> statement-breakpoint
48
+
ALTERTABLE"legal_holds" DROP COLUMN "hold_criteria";--> statement-breakpoint
49
+
ALTERTABLE"legal_holds" DROP COLUMN "applied_by_identifier";--> statement-breakpoint
50
+
ALTERTABLE"legal_holds" DROP COLUMN "applied_at";--> statement-breakpoint
0 commit comments