@rudderhq/db 0.3.4-canary.2 → 0.3.4-canary.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ CREATE TABLE "library_entries" (
2
+ "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3
+ "org_id" uuid NOT NULL,
4
+ "kind" text DEFAULT 'file' NOT NULL,
5
+ "source_type" text DEFAULT 'workspace_file' NOT NULL,
6
+ "current_path" text,
7
+ "title" text NOT NULL,
8
+ "status" text DEFAULT 'active' NOT NULL,
9
+ "created_by_agent_id" uuid,
10
+ "created_by_user_id" text,
11
+ "updated_by_agent_id" uuid,
12
+ "updated_by_user_id" text,
13
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
14
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
15
+ );
16
+ --> statement-breakpoint
17
+ ALTER TABLE "library_entries" ADD CONSTRAINT "library_entries_org_id_organizations_id_fk" FOREIGN KEY ("org_id") REFERENCES "public"."organizations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
18
+ ALTER TABLE "library_entries" ADD CONSTRAINT "library_entries_created_by_agent_id_agents_id_fk" FOREIGN KEY ("created_by_agent_id") REFERENCES "public"."agents"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
19
+ ALTER TABLE "library_entries" ADD CONSTRAINT "library_entries_updated_by_agent_id_agents_id_fk" FOREIGN KEY ("updated_by_agent_id") REFERENCES "public"."agents"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
20
+ CREATE INDEX "library_entries_org_idx" ON "library_entries" USING btree ("org_id");--> statement-breakpoint
21
+ CREATE INDEX "library_entries_org_status_idx" ON "library_entries" USING btree ("org_id","status");--> statement-breakpoint
22
+ CREATE UNIQUE INDEX "library_entries_org_current_path_uq" ON "library_entries" USING btree ("org_id","current_path");
@@ -0,0 +1 @@
1
+ ALTER TABLE "projects" ADD COLUMN "icon" text;
@@ -0,0 +1 @@
1
+ ALTER TABLE "operator_profiles" ADD COLUMN "preferences" jsonb DEFAULT '{}'::jsonb NOT NULL;