const Foo = Temporal(sequelize.define('foo', {
amount: {
type: Sequelize.INTEGER,
validate: { min: 0 },
allowNull: false
},
}, {
indexes: [
{ fields: [ 'amount' ] },
],
}), sequelize)
This causes an error in postgres as it will say
Unhandled rejection SequelizeDatabaseError: relation "foo_amount" already exists
since it will try to create an index of the same name on the fooHistories table
This causes an error in postgres as it will say
Unhandled rejection SequelizeDatabaseError: relation "foo_amount" already existssince it will try to create an index of the same name on the fooHistories table