#1545·cli

Why I cannot generate model using attribute enum with defaultValue?

Author: flyingduck92Created Aug 26, 2025Updated Aug 26, 2025

I was trying to generate model using below command but didn't work: npx sequelize-cli model:generate --name Profile --attributes username:string,imageUrl:string,fullname:string,dateOfBirth:date,UserId:UUID,role:enum:'{staff,admin}':defaultValue:staff

Why I cannot generate model using attribute enum with defaultValue? If I delete defaultValue part its working

npx sequelize-cli model:generate --name Profile --attributes username:string,imageUrl:string,fullname:string,dateOfBirth:date,UserId:UUID,role:enum:'{staff,admin}'