@cat-factory/node-server 0.97.3 → 0.98.0

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,35 @@
1
+ CREATE TABLE "account_skills" (
2
+ "skill_id" text,
3
+ "account_id" text,
4
+ "name" text NOT NULL,
5
+ "description" text NOT NULL,
6
+ "instructions" text NOT NULL,
7
+ "resources" text DEFAULT '[]' NOT NULL,
8
+ "source_id" text NOT NULL,
9
+ "source_path" text NOT NULL,
10
+ "source_sha" text NOT NULL,
11
+ "pinned_commit" text,
12
+ "created_at" bigint NOT NULL,
13
+ "updated_at" bigint NOT NULL,
14
+ "deleted_at" bigint,
15
+ CONSTRAINT "account_skills_pkey" PRIMARY KEY("account_id","skill_id")
16
+ );
17
+ --> statement-breakpoint
18
+ CREATE TABLE "skill_sources" (
19
+ "id" text PRIMARY KEY,
20
+ "account_id" text NOT NULL,
21
+ "repo_owner" text NOT NULL,
22
+ "repo_name" text NOT NULL,
23
+ "git_ref" text DEFAULT 'HEAD' NOT NULL,
24
+ "dir_path" text DEFAULT '' NOT NULL,
25
+ "last_synced_commit" text,
26
+ "last_synced_at" bigint,
27
+ "created_at" bigint NOT NULL,
28
+ "deleted_at" bigint
29
+ );
30
+ --> statement-breakpoint
31
+ CREATE INDEX "idx_account_skills_account" ON "account_skills" ("account_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
32
+ CREATE INDEX "idx_account_skills_source" ON "account_skills" ("source_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
33
+ CREATE UNIQUE INDEX "idx_skill_sources_unique" ON "skill_sources" ("account_id","repo_owner","repo_name","git_ref","dir_path");--> statement-breakpoint
34
+ CREATE INDEX "idx_skill_sources_account" ON "skill_sources" ("account_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
35
+ CREATE INDEX "idx_skill_sources_repo" ON "skill_sources" ("repo_owner","repo_name") WHERE "deleted_at" IS NULL;