Migrating schematic changes and data from Sequelize to the database
We have defined our database’s schema with the generated files from the command-line tool, and we are now ready to migrate those definitions to our DBMS. Using Sequelize’s migrations can help teams of developers maintain the same schema structure across multiple machines. Migrations can provide a historical reference as to how your database has changed over time, which can also help us undo certain changes and revert our database’s schema to a specific time.
Migrating schematic changes
The Sequelize CLI provides a convenient way of propagating updates toward a database. All of our schematic changes will be located within the migrations
directory, and all of our data seeds will be located within the seeders
directory. This chapter will cover only the initialization of the database’s structure. In subsequent chapters, there will be examples of adding and removing columns (or indices...