DN_Dev
DN_Dev
DTDrizzle Team
Created by DN_Dev on 1/2/2024 in #help
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
3 replies