CREATE TABLE "support_ticket_attachments" ( "id" text PRIMARY KEY NOT NULL, "ticket_id" text NOT NULL, "storage_key" text NOT NULL, "content_type" text NOT NULL, "size_bytes" integer NOT NULL, "created_at" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint ALTER TABLE "support_ticket_attachments" ADD CONSTRAINT "support_ticket_attachments_ticket_id_support_tickets_id_fk" FOREIGN KEY ("ticket_id") REFERENCES "public"."support_tickets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint CREATE INDEX "support_ticket_attachments_ticket_idx" ON "support_ticket_attachments" USING btree ("ticket_id");