8.12.1357 script error EF migration
Posted: Thu 11 Apr 2019 01:47
dotnet ef migrations script --context ConfigurationDBContext
-- Script was generated by Devart dotConnect for MySQL, Version 8.12.1357
-- Product home page: http://www.devart.com/dotconnect/mysql
-- Database version: MySQL 8.0.14
-- Script date 4/10/2019 6:14:51 PM
ALTER TABLE ApiResources
ADD COLUMN Created datetime DEFAULT CAST('0001-01-01 00:00:00' AS DATETIME) NOT NULL;
The cast() is unnecessary. The value is automatically converted to the correct type:
ALTER TABLE Table1 ADD COLUMN Created datetime DEFAULT '0001-01-01 00:00:00' NOT NULL;
MySQL allows constants for default values but does not permit expressions.
-- Script was generated by Devart dotConnect for MySQL, Version 8.12.1357
-- Product home page: http://www.devart.com/dotconnect/mysql
-- Database version: MySQL 8.0.14
-- Script date 4/10/2019 6:14:51 PM
ALTER TABLE ApiResources
ADD COLUMN Created datetime DEFAULT CAST('0001-01-01 00:00:00' AS DATETIME) NOT NULL;
The cast() is unnecessary. The value is automatically converted to the correct type:
ALTER TABLE Table1 ADD COLUMN Created datetime DEFAULT '0001-01-01 00:00:00' NOT NULL;
MySQL allows constants for default values but does not permit expressions.