sequelize-auto
sequelize-auto copied to clipboard
Text default value not escaped when extracted from custom type
Hey! We are using this lib to generate ours models and works great! But we found the following issue:
CREATE TYPE test_source AS ENUM ('first', 'second');
CREATE TABLE test
(
whatever test_source[] DEFAULT '{first}'
);
The model created is:
whatever: {
type: DataTypes.ARRAY(DataTypes.ENUM("first","second")),
defaultValue: [first]
}
As far as I understand, the default value should be:
defaultValue: ["first"]