Foreign Key - On Delete

When using .references(() => id, {onDelete: 'cascade'}) however it doesn't seem like there's a similar option using extraConfig option, which I use mainly to name my foreign keys.
(table) => ({
reference: foreignKey({
columns: [table.some_id],
foreignColumns: [some.id],
name: 'some_id_fk',
}),
})
(table) => ({
reference: foreignKey({
columns: [table.some_id],
foreignColumns: [some.id],
name: 'some_id_fk',
}),
})
Can anyone confirm? Otherwise I'd have to manually overwrite migrations I guess
2 Replies
Angelelz
Angelelz12mo ago
Yeah, I believe there's a open PR for this.
DN_Dev
DN_DevOP12mo ago
I see, thanks for letting me know
Want results from more Discord servers?
Add your server