sequelize
Promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server. More information: https://github.com/sequelize/cli/blob/main/README.md.
- Create a model with 3 fields and a migration file:
sequelize model:generate --name --attributes
- 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
- Populate database using all seed files:
sequelize db:seed:all
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
