column "summary" cannot be cast automatically to type jsonb

Hello!

I'm getting this error when running my migrations, I used to have a text field and now it's a jsonb

summary: jsonb("summary").notNull(),


How can I resolve this?

This is the migration:

ALTER TABLE "merlin_task_results" ALTER COLUMN "summary" SET DATA TYPE jsonb;--> statement-breakpoint
ALTER TABLE "merlin_task_results" ALTER COLUMN "summary" SET NOT NULL;
Was this page helpful?