- Instalando dependências
$ yarn add typeorm reflect-metadata sqlite3
- Criando uma migration
$ yarn typeorm migration:create -n CreateUsers
- Rodando as migrations
yarn typeorm migration:run
- Revertendo a migration
yarn typeorm migration:revert
- Alterando user com migration
$ yarn typeorm migration:create -n AlterUserAddPassword
$ yarn typeorm migration:run
- Criando entidade
yarn typeorm entity:create -n User
Descomentar no
tsconfig.json
- "experimentalDecorators": true,
- "emitDecoratorMetadata": true,
- "strictPropertyInitialization": false,
- Entidades criadas
- Elogios cadastrados