I am trying to comprehend associations between tables in Sequelize (postgre sql). I know that migrations have two ways to manage associations - adding a reference property to the table field declaration in the queryInterface.CreateTable() function. You can also add a queryInterface.addConstraints() function where you can set constraints. It seems to me that the queryInterface.CreateTable() function is enough for Sequelize to make the constraints itself, then I don’t understand *whether it’s necessary to add the queryInterface.addConstraints() function in addition to the references field. In model you also have to call two functions for each association, for example, BelongsTo() and HasMany(). But I can't figure out what these functions do because they don't change the database. Please help me understand difference