Answers for "sequelize custom primary key"

1

sequelize custom primary key

class Collection extends Model {}

Collection.init({
  uid: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true // Automatically gets converted to SERIAL for postgres
  }
}, { sequelize });
Posted by: Guest on October-21-2021

Code answers related to "sequelize custom primary key"

Code answers related to "Javascript"

Browse Popular Code Answers by Language