kopia lustrzana https://github.com/FacilMap/facilmap
Make onUpdate cascade explicit for database
rodzic
9a239ae056
commit
fa27bd0445
|
@ -47,6 +47,7 @@ export const dataDefinition = {
|
|||
export function makeNotNullForeignKey(type: string, field: string, error = false): AssociationOptions {
|
||||
return {
|
||||
as: type,
|
||||
onUpdate: "CASCADE",
|
||||
onDelete: error ? "RESTRICT" : "CASCADE",
|
||||
foreignKey: { name: field, allowNull: false }
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue