Create Id with sequalize

Viewed 18

i have a proyect with sequalize in my back, i have a model Dogs, that has id with dataTypes.UUID. I want to create my own ID autoincremet width concat string. example: 12345db, 12346db.

this is my code in the model

id:{
  type: DataTypes.UUID,
  defaultValue: DataTypes.UUIDV4,
  allowNull:false,
  primaryKey: true,
},

this is result in db enter image description here

0 Answers
Related