Documentation
    Preparing search index...

    Enumeration Deferrable

    Can be used to make foreign key constraints deferrable. This is only supported in PostgreSQL.

    The foreign keys can be configured like this. It will create a foreign key that will check the constraints immediately when the data was inserted.

    class MyModel extends Model {}
    MyModel.init({
    foreign_id: {
    type: DataTypes.INTEGER,
    references: {
    model: OtherModel,
    key: 'id',
    deferrable: Sequelize.Deferrable.INITIALLY_IMMEDIATE
    }
    }
    }, { sequelize });
    Index
    INITIALLY_DEFERRED: "INITIALLY_DEFERRED"
    INITIALLY_IMMEDIATE: "INITIALLY_IMMEDIATE"
    NOT: "NOT"