CREATE TABLE "sys"."trigger_claim" ( "key" text PRIMARY KEY NOT NULL, "claimed_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE "sys"."trigger" ( "id" text PRIMARY KEY NOT NULL, "name" text NOT NULL, "enabled" boolean DEFAULT true NOT NULL, "process_package_id" text NOT NULL, "mapping" jsonb DEFAULT '[]'::jsonb NOT NULL, "spec" jsonb NOT NULL, "last_fired_at" timestamp with time zone, "created_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE INDEX "trigger_enabled_idx" ON "sys"."trigger" USING btree ("enabled");