prisma1-upgrade icon indicating copy to clipboard operation
prisma1-upgrade copied to clipboard

Can't set default value of DATETIME column

Open baptistemarchand opened this issue 4 years ago • 0 comments

During the upgrade process, one of the SQL statements I have to run is this one:

ALTER TABLE `MedicalTransporter` CHANGE `lastBookingRequestAt` `lastBookingRequestAt` MEDIUMTEXT NOT NULL DEFAULT '1970-01-01T00:00:00Z'

But when I run it (in Sequel Pro) I get this message:

BLOB, TEXT, GEOMETRY or JSON column 'lastBookingRequestAt' can't have a default value

Even though this column as type DATETIME image

I'm using MySql 5.7.28. Not sure if that's a MySql issue or something Prisma can handle.

baptistemarchand avatar Nov 19 '20 16:11 baptistemarchand