typeorm-polymorphic icon indicating copy to clipboard operation
typeorm-polymorphic copied to clipboard

How to generate migration?

Open mogafk opened this issue 1 year ago • 0 comments

I added PolymorphicParent and PolymorphicChildren decorators to entities but when i try to generate migration like this

typeorm-ts-node-esm migration:generate -d src/migrations-data-source.ts src/migrations/$PG_MIGRATION_NAME

and my migrations generated without new table and columns for polymoprh relations.

My migrations-data-source.ts looks like

import { DataSource } from "typeorm";
export const PGDataSource = new DataSource({
....
})

should i change migrations-data-source.ts for example or something else? i dont understand :(

mogafk avatar May 31 '24 07:05 mogafk