lurqrun 0.0.4 → 0.0.6

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,11 @@
1
+ CREATE TABLE "resolved_closures" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "package_name" text NOT NULL,
4
+ "version" text NOT NULL,
5
+ "nodes" jsonb NOT NULL,
6
+ "fetched_at" timestamp with time zone DEFAULT now() NOT NULL
7
+ );
8
+ --> statement-breakpoint
9
+ ALTER TABLE "compat_edges" ADD COLUMN "provenance" text DEFAULT 'verified' NOT NULL;--> statement-breakpoint
10
+ ALTER TABLE "compat_edges" ADD COLUMN "witness_count" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
11
+ CREATE UNIQUE INDEX "resolved_closures_pkg_idx" ON "resolved_closures" USING btree ("package_name","version");
@@ -0,0 +1,9 @@
1
+ CREATE TABLE "api_surfaces" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "package_name" text NOT NULL,
4
+ "version" text NOT NULL,
5
+ "surface" jsonb NOT NULL,
6
+ "extracted_at" timestamp with time zone DEFAULT now() NOT NULL
7
+ );
8
+ --> statement-breakpoint
9
+ CREATE UNIQUE INDEX "api_surfaces_pkg_idx" ON "api_surfaces" USING btree ("package_name","version");
@@ -0,0 +1 @@
1
+ ALTER TABLE "packages" ADD COLUMN "graph_scanned_version" text;
@@ -0,0 +1,10 @@
1
+ CREATE TABLE "compat_verify_queue" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "set_key" text NOT NULL,
4
+ "packages" jsonb NOT NULL,
5
+ "attempts" integer DEFAULT 0 NOT NULL,
6
+ "requested_at" timestamp with time zone DEFAULT now() NOT NULL,
7
+ CONSTRAINT "compat_verify_queue_set_key_unique" UNIQUE("set_key")
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE INDEX "compat_verify_queue_requested_idx" ON "compat_verify_queue" USING btree ("requested_at");
@@ -0,0 +1,11 @@
1
+ CREATE TABLE "owner_usage_daily" (
2
+ "owner_id" text NOT NULL,
3
+ "date" date NOT NULL,
4
+ "tool" text NOT NULL,
5
+ "count" integer DEFAULT 0 NOT NULL,
6
+ CONSTRAINT "owner_usage_daily_owner_id_date_tool_pk" PRIMARY KEY("owner_id","date","tool")
7
+ );
8
+ --> statement-breakpoint
9
+ ALTER TABLE "packages" ADD COLUMN "first_requested_by_owner_id" text;--> statement-breakpoint
10
+ CREATE INDEX "owner_usage_daily_owner_date_idx" ON "owner_usage_daily" USING btree ("owner_id","date");--> statement-breakpoint
11
+ CREATE INDEX "packages_first_requested_by_idx" ON "packages" USING btree ("first_requested_by_owner_id");
@@ -0,0 +1,50 @@
1
+ CREATE TABLE "claims" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "subject_id" integer NOT NULL,
4
+ "object_id" integer,
5
+ "relation" text NOT NULL,
6
+ "environment_id" integer NOT NULL,
7
+ "tenant_id" bigint DEFAULT 0 NOT NULL
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE TABLE "entities" (
11
+ "id" serial PRIMARY KEY NOT NULL,
12
+ "kind" text NOT NULL,
13
+ "namespace" text NOT NULL,
14
+ "name" text NOT NULL,
15
+ "version" text,
16
+ "canonical_key" text NOT NULL,
17
+ "tenant_id" bigint DEFAULT 0 NOT NULL,
18
+ "first_seen" timestamp with time zone DEFAULT now() NOT NULL
19
+ );
20
+ --> statement-breakpoint
21
+ CREATE TABLE "environments" (
22
+ "id" serial PRIMARY KEY NOT NULL,
23
+ "os" text NOT NULL,
24
+ "arch" text NOT NULL,
25
+ "runtime" text NOT NULL,
26
+ "runtime_ver" text NOT NULL,
27
+ "resolver" text,
28
+ "fingerprint" text NOT NULL,
29
+ CONSTRAINT "environments_fingerprint_unique" UNIQUE("fingerprint")
30
+ );
31
+ --> statement-breakpoint
32
+ CREATE TABLE "observations" (
33
+ "id" serial PRIMARY KEY NOT NULL,
34
+ "claim_id" integer NOT NULL,
35
+ "verdict" text NOT NULL,
36
+ "evidence" text,
37
+ "oracle_id" text NOT NULL,
38
+ "oracle_ver" text NOT NULL,
39
+ "cost_millis" integer,
40
+ "observed_at" timestamp with time zone DEFAULT now() NOT NULL
41
+ );
42
+ --> statement-breakpoint
43
+ ALTER TABLE "claims" ADD CONSTRAINT "claims_subject_id_entities_id_fk" FOREIGN KEY ("subject_id") REFERENCES "public"."entities"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
44
+ ALTER TABLE "claims" ADD CONSTRAINT "claims_object_id_entities_id_fk" FOREIGN KEY ("object_id") REFERENCES "public"."entities"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
45
+ ALTER TABLE "claims" ADD CONSTRAINT "claims_environment_id_environments_id_fk" FOREIGN KEY ("environment_id") REFERENCES "public"."environments"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
46
+ ALTER TABLE "observations" ADD CONSTRAINT "observations_claim_id_claims_id_fk" FOREIGN KEY ("claim_id") REFERENCES "public"."claims"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
47
+ CREATE UNIQUE INDEX "claims_tuple_idx" ON "claims" USING btree ("subject_id","object_id","relation","environment_id","tenant_id");--> statement-breakpoint
48
+ CREATE UNIQUE INDEX "entities_canonical_idx" ON "entities" USING btree ("canonical_key","tenant_id");--> statement-breakpoint
49
+ CREATE INDEX "entities_kind_idx" ON "entities" USING btree ("kind","namespace","name");--> statement-breakpoint
50
+ CREATE INDEX "observations_claim_idx" ON "observations" USING btree ("claim_id","observed_at");