Skip to content

backend: Database

Emilie Hester edited this page Mar 28, 2017 · 2 revisions

Sequelize is setup using sequelize-cli

  1. 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

  2. Create a database for the project.

  3. npm run db:setup runs the database migration and seeder files

  4. npm run db:drop drops all of the tables from the database

  5. If you want more granular control, you'll need to install sequelize-cli globally npm install -g sequelize-cli. If you are using postgreSQL you may also need to globally install pg.

  6. Now you have access to sequelize from 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.

Clone this wiki locally