-
Notifications
You must be signed in to change notification settings - Fork 9
backend: Database
Sequelize is setup using sequelize-cli
-
Verify that you have a SQL database installed. We used PostgreSQL but SQLite3, MySQL, any of those will do. If you choose something other than PostgreSQL, be sure to update your dependencies
-
Create a database for the project.
-
npm run db:setupruns the database migration and seeder files -
npm run db:dropdrops all of the tables from the database -
If you want more granular control, you'll need to install
sequelize-cligloballynpm install -g sequelize-cli. If you are usingpostgreSQLyou may also need to globally installpg. -
Now you have access to
sequelizefrom the command line. Refer to: sequelize-cli to see the commands that are available to you.
So easy. The folder migrations includes the scripts that initially set up the seeder database. The seeders folder contains the seed data.