From 0bddfe82b03f2870bccc4a954186f76425037188 Mon Sep 17 00:00:00 2001 From: Izzur Zuhri Date: Mon, 17 Feb 2020 19:36:56 +0700 Subject: [PATCH] sequelize: add page (#3861) --- pages/common/sequelize.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/sequelize.md diff --git a/pages/common/sequelize.md b/pages/common/sequelize.md new file mode 100644 index 0000000000..18f5a10fea --- /dev/null +++ b/pages/common/sequelize.md @@ -0,0 +1,24 @@ +# sequelize + +> Promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. +> More information: . + +- Create a model and a migration file: + +`sequelize model:generate --name {{table_name}}` + +- Run the migration file: + +`sequelize db:migrate` + +- Revert all migrations: + +`sequelize db:migrate:undo:all` + +- Create a seed file with the specified name to populate the database: + +`sequelize seed:generate --name {{seed_filename}}` + +- Populate database using all seed files: + +`sequelize db:seed:all`