sequelize-auto
sequelize-auto copied to clipboard
Wrong defaultValue
Table "public.admin"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
------------------------+-----------------------------+-----------+----------+-----------------------------------+----------+--------------+-------------
id | integer | | not null | nextval('admin_id_seq'::regclass) | plain | |
login | character varying(255) | | not null | | extended | |
password_hash | character varying(255) | | not null | | extended | |
registered_at | timestamp without time zone | | not null | timezone('utc'::text, now()) | plain | |
id: {
autoIncrement: true,
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true
},
login: {
type: DataTypes.STRING(255),
allowNull: false
},
password_hash: {
type: DataTypes.STRING(255),
allowNull: false
},
registered_at: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: 'timezone(utc'
},
DB: psql (PostgreSQL) 13.5 sequelize-auto: 0.8.8
see https://github.com/sequelize/sequelize-auto/issues/592 for a proposed solution