Setup TypeORM

This commit is contained in:
Philipinho
2023-08-04 16:26:43 +01:00
parent 11018ea976
commit cebad0e0a5
23 changed files with 1018 additions and 70 deletions

View File

@ -45,6 +45,30 @@ $ npm run start:dev
$ npm run start:prod
```
## Migrations
```bash
# This creates a new empty migration file named 'init'
$ npm run migration:create --name=init
# Generates 'init' migration file from existing entities to update the database schema
$ npm run migration:generate --name=init
# Runs all pending migrations to update the database schema
$ npm run migration:run
# Reverts the last executed migration
$ npm run migration:revert
# Reverts all migrations
$ npm run migration:revert
# Shows the list of executed and pending migrations
$ npm run migration:show
## Test
```bash