cadastros-nest-base
v3.0.21
Published
> Esse projeto tem como objetivo centralizar as entidades utilizadas nos microserviços de ```programa```, ```pessoa``` e ```participante```, para que quando ocorra uma alteração na base ela possa ser replicada nos microserviços com facilidade.
Downloads
486
Readme
Cadastros Nest Base
Esse projeto tem como objetivo centralizar as entidades utilizadas nos microserviços de
programa
,pessoa
eparticipante
, para que quando ocorra uma alteração na base ela possa ser replicada nos microserviços com facilidade.
Alterando uma entidade
- Gere as entidades do banco
farm_cadastro
usando o pacotetypeorm-model-generator
com o seguinte comando:
$ pnpx typeorm-model-generator -h localhost -d farm_cadastro -p 3308 -u SEUUSUARIODOBANCO -x SUASENHADEACESSOAOBANCO -e mysql
- Copie a pasta
entities
e cole na raiz do projeto.- Caso existam novas entidades, é necessário adicionar o export dessa entidade no arquivo
index.ts
- Caso existam novas entidades, é necessário adicionar o export dessa entidade no arquivo
IMPORTANTE: REMOVER A ENTIDADE DE TRIGGER_DEBUG AO COLAR AS ENTIDADES GERADAS
Atualize a versão do pacote alterando o atributo version no package.json
Gere um build novo com o seguinte comando:
$ pnpm build
- Atualize a versão do pacote
cadastros-nest-base
nos microserviços.