fix: Remove region_id from countries on region deletes (#1330)
* Remove region id from countries on delete * Update snapshots
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
Entity,
|
||||
Index,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from "typeorm"
|
||||
|
||||
import { Region } from "./region"
|
||||
|
||||
@Entity()
|
||||
@@ -32,12 +31,9 @@ export class Country {
|
||||
|
||||
@Index()
|
||||
@Column({ nullable: true })
|
||||
region_id: string
|
||||
region_id: string | null
|
||||
|
||||
@ManyToOne(
|
||||
() => Region,
|
||||
r => r.countries
|
||||
)
|
||||
@ManyToOne(() => Region, (r) => r.countries)
|
||||
@JoinColumn({ name: "region_id" })
|
||||
region: Region
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user