Select the types of activity you want to include in your feed.
Add integrations, SSH keys and Tailscale tokens
Add Drizzle migration and metadata for the new schemas. Add a 'redacted' column to secrets and update schema files across api, cf-sandbox, and sandbox apps
···11+CREATE TABLE "integrations" (
22+ "id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
33+ "sandbox_id" text NOT NULL,
44+ "name" text NOT NULL,
55+ "description" text,
66+ "webhook_url" text NOT NULL,
77+ "created_at" timestamp DEFAULT now() NOT NULL
88+);
99+--> statement-breakpoint
1010+CREATE TABLE "ssh_keys" (
1111+ "id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
1212+ "sandbox_id" text,
1313+ "public_key" text NOT NULL,
1414+ "private_key" text NOT NULL,
1515+ "redacted" text NOT NULL,
1616+ "created_at" timestamp DEFAULT now() NOT NULL
1717+);
1818+--> statement-breakpoint
1919+CREATE TABLE "tailscale_tokens" (
2020+ "id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
2121+ "sandbox_id" text,
2222+ "tokens" text NOT NULL,
2323+ "redacted" text NOT NULL,
2424+ "created_at" timestamp DEFAULT now() NOT NULL
2525+);
2626+--> statement-breakpoint
2727+ALTER TABLE "secrets" ADD COLUMN "redacted" text;--> statement-breakpoint
2828+ALTER TABLE "integrations" ADD CONSTRAINT "integrations_sandbox_id_sandboxes_id_fk" FOREIGN KEY ("sandbox_id") REFERENCES "public"."sandboxes"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
2929+ALTER TABLE "ssh_keys" ADD CONSTRAINT "ssh_keys_sandbox_id_sandboxes_id_fk" FOREIGN KEY ("sandbox_id") REFERENCES "public"."sandboxes"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
3030+ALTER TABLE "tailscale_tokens" ADD CONSTRAINT "tailscale_tokens_sandbox_id_sandboxes_id_fk" FOREIGN KEY ("sandbox_id") REFERENCES "public"."sandboxes"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
3131+CREATE UNIQUE INDEX "unique_sandbox_integration" ON "integrations" USING btree ("sandbox_id","name");