Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 873 Bytes

bancodedados.md

File metadata and controls

63 lines (39 loc) · 873 Bytes

Configurando o Banco de dados

  • Instalando dependências
$ yarn add typeorm reflect-metadata sqlite3

Migration

  • 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

Entidade

  • Criando entidade
yarn typeorm entity:create -n User

Descomentar no tsconfig.json

  • "experimentalDecorators": true,
  • "emitDecoratorMetadata": true,
  • "strictPropertyInitialization": false,

Beekeeper

  • Entidades criadas

  • Elogios cadastrados