merge: convert to bun workspaces monorepo
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
CREATE TABLE "apikey" (
|
||||
"id" text PRIMARY KEY NOT NULL,
|
||||
"config_id" text DEFAULT 'default' NOT NULL,
|
||||
"name" text,
|
||||
"start" text,
|
||||
"reference_id" text NOT NULL,
|
||||
"prefix" text,
|
||||
"key" text NOT NULL,
|
||||
"refill_interval" integer,
|
||||
"refill_amount" integer,
|
||||
"last_refill_at" timestamp,
|
||||
"enabled" boolean DEFAULT true NOT NULL,
|
||||
"rate_limit_enabled" boolean DEFAULT true NOT NULL,
|
||||
"rate_limit_time_window" integer,
|
||||
"rate_limit_max" integer,
|
||||
"request_count" integer DEFAULT 0 NOT NULL,
|
||||
"remaining" integer,
|
||||
"last_request" timestamp,
|
||||
"expires_at" timestamp,
|
||||
"created_at" timestamp DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp DEFAULT now() NOT NULL,
|
||||
"permissions" text,
|
||||
"metadata" text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX "apikey_config_id_idx" ON "apikey" USING btree ("config_id");--> statement-breakpoint
|
||||
CREATE INDEX "apikey_reference_id_idx" ON "apikey" USING btree ("reference_id");--> statement-breakpoint
|
||||
CREATE INDEX "apikey_key_idx" ON "apikey" USING btree ("key");
|
||||
Reference in New Issue
Block a user