title: sequelize model, migration file and foreign key. which one is right?
body: <p>At first time when I started studying sequelize I just had no idea, just copy and pasted the code when it comes to make relations between two models.</p>
  
  <p>It really confused me whether I have to insert foreign keys both to the model file and migration file or for only migration file.</p>
  
  <p>I knew that the migrations are files that have commands for changing your database.</p>
  
  <p>so definitely we have to manually insert foreign keys to the migration file so that database can create them.</p>
  
  <p>In sequelize doc, if we add relations like has many and belongs to, the sequelize will automatically add foreign keys.</p>
  
  <p>so I was really confused whether I have to add them or not.</p>
  
  <p>some questions I asked before the answers were fifty-fifty.</p>
  
  <p>some says that we don`t have to manually add foreign keys to the model because sequelize will automatically add them.</p>
  
  <p>but some says that we have to manually add foreign keys to the model because we have to match(sync) columns between models and migration files.</p>
  
  <p>even worse, the articles explaining about sequelize relations are differ from each other.</p>
  
  <p>so, which one is right??</p>
  
  <p>I really want to get clear answer.</p>
  
  <p>It will be really thankful to get some reasons (if we have to add foreign key to the model) </p>
  
  <p>not exaggerated, I have been curious of this issue for about six month.</p>