-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
bugquestionsize-mModerately complex tasks involving multiple steps. Estimated effort: Half a day to 1 dayModerately complex tasks involving multiple steps. Estimated effort: Half a day to 1 day
Description
Feature Description
There is an option to ignore entity when generating migration
@Entity({ synchronize: false })But there is no such option for @Column().
The Solution
It would be nice to have @Column({ synchronize: false })
Considered Alternatives
I didn't find any alternatives to this
Additional Context
The problem is that I have a column like this one:
@Column({ insert: false, update: false, select: false })
fooBar?: boolean;
It's not persisted to DB, I assign a result of custom .addSelect(...) to it.
But when I generate a migration, typeorm treats it as real column and generates ALTER TABLE ... for it.
So I need a mechanism to ignore a column in migration generation.
Relevant Database Driver(s)
- aurora-mysql
- aurora-postgres
- better-sqlite3
- cockroachdb
- cordova
- expo
- mongodb
- mysql
- nativescript
- oracle
- postgres
- react-native
- sap
- spanner
- sqlite
- sqlite-abstract
- sqljs
- sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
Metadata
Metadata
Assignees
Labels
bugquestionsize-mModerately complex tasks involving multiple steps. Estimated effort: Half a day to 1 dayModerately complex tasks involving multiple steps. Estimated effort: Half a day to 1 day