You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can create a MODEL and a MIGRATION SCRIPT using the command node_modules/.bin/sequelize model:create --name Todo --attributes title:string,something:integer Note that there should not be spaces between the attributes.
This will create a file under src/db/migrations and you can then populate the entire script as well as a model under src/db/models.
Next, you can execute the migration script using node_modules/.bin/sequelize db:migrate
You can execute a rollback with node_modules/.bin/sequelize db:migrate:undo
Running
go to config/docker and run docker-compose up
yarn start
Sequelize setup
Sequelize's configuration file path is declared in .sequelizerc
folders and files were generated with yarn sequelize init
This will generate 3 folders/file, config.json, migration folder and models folder.
config.json will contain the username and password for the database connection.