Deferrable

When you specify a foreign key column it is optionally possible to declare the deferrabletype in PostgreSQL. The following options are available:

  1. // Defer all foreign key constraint check to the end of a transaction
  2. Sequelize.Deferrable.INITIALLY_DEFERRED
  3. // Immediately check the foreign key constraints
  4. Sequelize.Deferrable.INITIALLY_IMMEDIATE
  5. // Don't defer the checks at all
  6. Sequelize.Deferrable.NOT

The last option is the default in PostgreSQL and won't allow you to dynamically changethe rule in a transaction. See the transaction section for further information.