CREATE TABLE "post_publish_job" (
	"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
	"post_id" uuid NOT NULL,
	"publish_at" timestamp NOT NULL,
	"created_at" timestamp DEFAULT now() NOT NULL,
	"updated_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "post_publish_job" ADD CONSTRAINT "post_publish_job_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "post_publish_job_post_id_uidx" ON "post_publish_job" USING btree ("post_id");--> statement-breakpoint
CREATE INDEX "post_publish_job_publish_at_idx" ON "post_publish_job" USING btree ("publish_at");