-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Why is second migration generated? #9229
Labels
Comments
7 tasks
Use case is not valid. Relational decorators must be applied to the properties with the type of the object to which relation maps, e.g.: import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
@Entity('testEntity')
export class TestEntity {
@PrimaryColumn()
public userId: string;
@OneToOne('User', 'test')
@JoinColumn({ name: 'userId' })
public user: User;
@Column({ type: 'jsonb', nullable: false })
public x: string[];
} |
This was referenced Jan 4, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
For some reason, TypeORM generates a second migration file after I run all migrations.
Expected Behavior
Typeorm would not generate second migration file.
Actual Behavior
Typeorm is generating a second migration file
Model Used
First Generated Migration File
Second Generated Migration File - Why ??
Steps to Reproduce
My Environment
Additional Context
Here are the list of packages we are using
Relevant Database Driver(s)
postgres
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: