yarn sequelize-cli db:create
yarn sequelize-cli db:migrate
yarn install
yarn start
echo "SAM_PASSWORD=$(openssl rand -base64 12)" > .env
echo "SESSION_SECRET=$(openssl rand -base64 12)" >> .env
To check if the migrations and models are in sync,
ensure you have installed apgdiff
then run:
export NODE_ENV=test
yarn sequelize-cli db:drop
yarn sequelize-cli db:create
yarn sequelize-cli db:migrate
pg_dump express_auth_test > migration.sql
yarn sequelize-cli db:drop
yarn sequelize-cli db:create
node models/sync.js
pg_dump express_auth_test > model.sql
apgdiff migration.sql model.sql > diff.sql