Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate migration? #53

Open
mogafk opened this issue May 31, 2024 · 0 comments
Open

How to generate migration? #53

mogafk opened this issue May 31, 2024 · 0 comments

Comments

@mogafk
Copy link

mogafk commented May 31, 2024

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant