lurqrun 0.1.0 → 0.1.3

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,2 @@
1
+ ALTER TABLE "packages" DROP CONSTRAINT "packages_name_unique";--> statement-breakpoint
2
+ CREATE UNIQUE INDEX "packages_ecosystem_name_idx" ON "packages" USING btree ("ecosystem","name");
@@ -0,0 +1,16 @@
1
+ CREATE TABLE "subscriptions" (
2
+ "owner_id" text PRIMARY KEY NOT NULL,
3
+ "stripe_customer_id" text NOT NULL,
4
+ "stripe_subscription_id" text,
5
+ "tier" text DEFAULT 'free' NOT NULL,
6
+ "status" text,
7
+ "current_period_end" timestamp with time zone,
8
+ "cancel_at_period_end" boolean DEFAULT false NOT NULL,
9
+ "last_event_at" timestamp with time zone,
10
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
11
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
12
+ CONSTRAINT "subscriptions_stripe_customer_id_unique" UNIQUE("stripe_customer_id"),
13
+ CONSTRAINT "subscriptions_stripe_subscription_id_unique" UNIQUE("stripe_subscription_id")
14
+ );
15
+ --> statement-breakpoint
16
+ CREATE INDEX "subscriptions_customer_idx" ON "subscriptions" USING btree ("stripe_customer_id");
@@ -0,0 +1,6 @@
1
+ CREATE TABLE "ask_spend_daily" (
2
+ "owner_id" text NOT NULL,
3
+ "date" date NOT NULL,
4
+ "usd_micros" bigint DEFAULT 0 NOT NULL,
5
+ CONSTRAINT "ask_spend_daily_owner_id_date_pk" PRIMARY KEY("owner_id","date")
6
+ );
@@ -0,0 +1,2 @@
1
+ ALTER TABLE "packages" ADD COLUMN IF NOT EXISTS "direct_dependents" integer;--> statement-breakpoint
2
+ ALTER TABLE "packages" ADD COLUMN IF NOT EXISTS "indirect_dependents" integer;
@@ -0,0 +1,14 @@
1
+ CREATE TABLE "stack_resolutions" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "set_key" text NOT NULL,
4
+ "packages" jsonb NOT NULL,
5
+ "names" text[] NOT NULL,
6
+ "resolved" boolean NOT NULL,
7
+ "reason" text,
8
+ "detail" text,
9
+ "resolved_at" timestamp with time zone DEFAULT now() NOT NULL,
10
+ CONSTRAINT "stack_resolutions_set_key_unique" UNIQUE("set_key")
11
+ );
12
+ --> statement-breakpoint
13
+ CREATE INDEX "stack_resolutions_names_idx" ON "stack_resolutions" USING gin ("names");--> statement-breakpoint
14
+ CREATE INDEX "stack_resolutions_resolved_at_idx" ON "stack_resolutions" USING btree ("resolved_at");
@@ -0,0 +1,3 @@
1
+ DROP INDEX "surface_queue_requested_idx";--> statement-breakpoint
2
+ ALTER TABLE "surface_queue" ADD COLUMN "kind" text DEFAULT 'package_surface' NOT NULL;--> statement-breakpoint
3
+ CREATE INDEX "surface_queue_requested_idx" ON "surface_queue" USING btree ("kind","requested_at");
@@ -0,0 +1 @@
1
+ ALTER TABLE "api_keys" ADD COLUMN "scopes" text[] DEFAULT '{}'::text[] NOT NULL;
@@ -0,0 +1,21 @@
1
+ CREATE TABLE "policy_decisions" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "owner_id" text NOT NULL,
4
+ "package_name" text NOT NULL,
5
+ "rule" text NOT NULL,
6
+ "action" text NOT NULL,
7
+ "tool" text NOT NULL,
8
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
9
+ );
10
+ --> statement-breakpoint
11
+ CREATE TABLE "selection_policy_changes" (
12
+ "id" serial PRIMARY KEY NOT NULL,
13
+ "owner_id" text NOT NULL,
14
+ "actor" text NOT NULL,
15
+ "before" jsonb NOT NULL,
16
+ "after" jsonb NOT NULL,
17
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL
18
+ );
19
+ --> statement-breakpoint
20
+ CREATE INDEX "policy_decisions_owner_idx" ON "policy_decisions" USING btree ("owner_id","created_at");--> statement-breakpoint
21
+ CREATE INDEX "selection_policy_changes_owner_idx" ON "selection_policy_changes" USING btree ("owner_id","created_at");