Move pages under tldr, lint run.sh, update docs

This commit is contained in:
2024-02-21 13:58:43 +02:00
parent 3d653cc7e6
commit 2c475fa62d
4806 changed files with 36 additions and 35 deletions

29
tldr/sequelize Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# sequelize
> Promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.
> More information: <https://sequelize.org/>.
- Create a model with 3 fields and a migration file:
`sequelize model:generate --name {{table_name}} --attributes {{field1:integer,field2:string,field3:boolean}}`
- 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`