test(vitess): used Restrict in place of SetNull to avoid surprising behavior in 'referential_actions_are_kept_intact' test
@@ -405,11 +405,10 @@ async fn referential_actions_are_kept_intact(api: &TestApi) -> TestResult {
model B {
id Int @id @default(autoincrement())
aId Int?
- a A? @relation(fields: [aId], references: [id], onDelete: SetNull)
+ a A? @relation(fields: [aId], references: [id], onDelete: Restrict)
}
"#};
- // note: we've probably introduced a regression here, `onDelete: SetNull` is gone from B's relation.
let expected = expect![[r#"
model A {
id Int @id @default(autoincrement())
@@ -419,7 +418,7 @@ async fn referential_actions_are_kept_intact(api: &TestApi) -> TestResult {
model B {
id Int @id @default(autoincrement())
aId Int?
- a A? @relation(fields: [aId], references: [id])
+ a A? @relation(fields: [aId], references: [id], onDelete: Restrict)
}
"#]];
