I need my id start not in 1. I tried to use initialAutoIncrement but not working.
My id should start in 1000, and increment by one.
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
initialAutoIncrement: 1000,
timestamps: false
}
This should work
async function myTest() {
await sequelize.queryInterface.createTable('User', {
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true
},
}, {
initialAutoIncrement: 1000
});
}