sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

PostgreSQL: autoIncrement property not being added for SERIAL columns in table

Open paulkr opened this issue 3 years ago • 3 comments

When programmatically generating schemas for tables, the autoIncrement property is not being set in the returned schema for columns where the SERIAL type has been added in the PostgreSQL table to define an auto-incrementing column.

paulkr avatar Jun 10 '21 16:06 paulkr

Hmm, I thought we fixed this before. I'll take a look.

steveschmitt avatar Jun 21 '21 16:06 steveschmitt

Hmm, it works for me. The SERIAL keyword creates a DEFAULT value for the column in the table. What does the DEFAULT look like for your column.

Also, what version of sequelize-auto are you using?

steveschmitt avatar Aug 07 '21 03:08 steveschmitt

Is this still a problem?

steveschmitt avatar Oct 18 '21 18:10 steveschmitt