Open Aha00a opened 1 year ago
I'm sorry and thank you for your sharing.
This PR is about default value.
I have field that uses single quote in default clause,
`id` binary(16) NOT NULL DEFAULT unhex(replace(uuid(),'-','')) COMMENT 'identifier',
then it generates
defaultValue: Sequelize.Sequelize.literal('unhex(replace(uuid(),'-',''))'),
then it causes error.
I've tried DEFAULT unhex(replace(uuid(),"-","")), but MariaDB converts " to '.
DEFAULT unhex(replace(uuid(),"-",""))
"
'
I always think thanking you when I use sequelize-auto, please consider this.
Best regards.
Besides the fix, this should also be considered: https://github.com/sequelize/sequelize-auto/issues/592
I'm sorry and thank you for your sharing.
This PR is about default value.
I have field that uses single quote in default clause,
then it generates
then it causes error.
I've tried
DEFAULT unhex(replace(uuid(),"-",""))
, but MariaDB converts"
to'
.I always think thanking you when I use sequelize-auto, please consider this.
Best regards.