The project :
Language: NodeJS
Database: Postgres
ORM: Sequelize v6
I’ve opted out of using sequelize.sync
Instead, I am using migrations to create/update database schema.
I define associations in model definition files.
The part that confuses me, is the references
option in model creation migrations.
The documentation is unclear about this option (and for the general use-case without sequelize.sync
as well).
The questions are:
- is the
references
option required in my specific use case? - is the
references
option recommended in my specific use case? - in which case would I possibly need this option?
- what is the proper way to manage associations in my specific use case?
Thanks in advance