An entity using the primary key is not autoIncrement sequelize-auto generated mysql table: true attribute

Use sequelize-auto mysql primary key generating no autoIncrement: true attribute, which can lead to error when data is inserted. Look git above is already solved, the solution is to modify the query template. I use the latest version 0.4.29, I do not understand why not fix the problem

https://github.com/sequelize/sequelize-auto/pull/359/commits/bd15c8108e6bb6058734e5ad4e4cd4ee14a8736d

In line 45, C.extra \ changed, C. EXTRA AS Extra \

Npm global path as packet

Windows XP - %USERPROFILE%\AppData\npm\node_modules
Windows 7, 8 and 10 - %USERPROFILE%\AppData\Roaming\npm\node_modules

Locate the file in sequelize-auto route  lib / dialects / index.js  regenerate entity modified it

Guess you like

Origin www.cnblogs.com/jidanfan/p/12078827.html