task-ep.1.5
This commit is contained in:
33
drizzle/0005_freezing_wendigo.sql
Normal file
33
drizzle/0005_freezing_wendigo.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
CREATE TABLE "crm_timeline_projection" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"organization_id" text NOT NULL,
|
||||
"branch_id" text,
|
||||
"customer_id" text,
|
||||
"lead_id" text,
|
||||
"opportunity_id" text,
|
||||
"quotation_id" text,
|
||||
"activity_id" text,
|
||||
"event_id" text NOT NULL,
|
||||
"entity_type" text NOT NULL,
|
||||
"entity_id" text NOT NULL,
|
||||
"timeline_type" text NOT NULL,
|
||||
"timeline_category" text NOT NULL,
|
||||
"occurred_at" timestamp with time zone NOT NULL,
|
||||
"actor_id" text,
|
||||
"actor_display" text,
|
||||
"title" text NOT NULL,
|
||||
"summary" text,
|
||||
"icon" text NOT NULL,
|
||||
"color" text NOT NULL,
|
||||
"priority" text DEFAULT 'normal' NOT NULL,
|
||||
"visibility" jsonb NOT NULL,
|
||||
"metadata" jsonb,
|
||||
"source_event" jsonb NOT NULL,
|
||||
"source_projection_version" integer DEFAULT 1 NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "crm_timeline_projection_event_version_idx" ON "crm_timeline_projection" USING btree ("event_id","source_projection_version");--> statement-breakpoint
|
||||
CREATE INDEX "crm_timeline_projection_org_occurred_idx" ON "crm_timeline_projection" USING btree ("organization_id","occurred_at");--> statement-breakpoint
|
||||
CREATE INDEX "crm_timeline_projection_customer_occurred_idx" ON "crm_timeline_projection" USING btree ("organization_id","customer_id","occurred_at");--> statement-breakpoint
|
||||
CREATE INDEX "crm_timeline_projection_activity_event_idx" ON "crm_timeline_projection" USING btree ("activity_id","event_id");
|
||||
7795
drizzle/meta/0005_snapshot.json
Normal file
7795
drizzle/meta/0005_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,13 @@
|
||||
"when": 1783922653023,
|
||||
"tag": "0004_sharp_mercury",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 5,
|
||||
"version": "7",
|
||||
"when": 1783925810194,
|
||||
"tag": "0005_freezing_wendigo",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user