jeudi 26 novembre 2015

Sequelize autoIncrement and SQLite

Just getting started with Sequelize and trying to setup an auto increment column on an SQLite database. The migration looks like this:

return queryInterface.createTable('Users', {
  id: {
    type: Sequelize.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },
  ...

But looking at the generated table schema gives this:

CREATE TABLE `Users` (`id` INTEGER PRIMARY KEY, ...

What happened to the auto-increment?

Aucun commentaire:

Enregistrer un commentaire