Skip to content
Advertisement

Nest JS Table is not creating. Written entities

Team,

I have followed Nest.js and TypeORM documentations. Somehow tables are not generating in PostgreSQL. The database is connected successfully.

Nest Server running without error. Issue: The table is not generating.

src/tag/tag.entity.ts

JavaScript

src/app.module.ts

JavaScript

.local.env

JavaScript

Please help me generate Postgres tables. Framework – Nest JS Database – PostgreSQL

enter image description here

enter image description here

enter image description here

enter image description here

Advertisement

Answer

Your username is mediumclone but the database you’re connecting to is postgres, so the tables are being created under the postgres table inside of the postgres server (I know, table and server being named the same is kinda confusing). Change the DATABASE env entry to be mediumclone and you’ll get the result you want

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement