79623506

Date: 2025-05-15 14:00:52
Score: 1.5
Natty:
Report link

Can you please double check your entity definitions?

I also had a similar issue, and after hours of debugging I found that I need to enable the synchronize attribute to allow typeorm to consider a given entity for migration.

The entity decorator should look like:

@Entity({ name: "table_name", synchronize: true })

If you want to run typeorm cli on typescript prrojects, you can install a wrapper for that purpose using the command below

npm install typeorm-ts-node-commonjs

After installing this, you can run commands with typesacript based data sources too

For ex, to generate a migration, once can use below command:

npx typeorm-ts-node-commonjs migration:generate path/to/migration -d path/to/typescript/datasource
Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Can you please
  • Low reputation (1):
Posted by: Abhishek