ALTER TABLE "posts" DROP CONSTRAINT "posts_main_tag_id_tags_id_fk";--> statement-breakpoint
ALTER TABLE "posts" RENAME COLUMN "main_tag_id" TO "primary_tag_id";--> statement-breakpoint
ALTER TABLE "posts" ADD CONSTRAINT "posts_primary_tag_id_tags_id_fk" FOREIGN KEY ("primary_tag_id") REFERENCES "public"."tags"("id") ON DELETE set null ON UPDATE no action;