17 lines · 718 B · Text
RawDownload
CREATE TABLE "tool_policy" (	"id" text NOT NULL,	"scope_id" text NOT NULL,	"pattern" text NOT NULL,	"action" text NOT NULL,	-- Fractional-indexing key (Jira lexorank style). Lex-ordered text;	-- always subdivisible by lengthening, so reorders never run out of	-- room.	"position" text NOT NULL,	"created_at" timestamp NOT NULL,	"updated_at" timestamp NOT NULL,	CONSTRAINT "tool_policy_scope_id_id_pk" PRIMARY KEY("scope_id","id"));--> statement-breakpoint-- List queries are always `WHERE scope_id = ? ORDER BY position`, so the-- composite index serves both the filter and the sort from one btree.CREATE INDEX "tool_policy_scope_id_position_idx" ON "tool_policy" USING btree ("scope_id", "position");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t