Преглед изворни кода

Add ON DELETE CASCADE to domain/range columns of association tables.

Kestrel пре 1 година
родитељ
комит
c60c21256c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      microrm/src/schema/build.rs

+ 1 - 1
microrm/src/schema/build.rs

@@ -42,7 +42,7 @@ impl TableInfo {
         });
         let fkeys = self.columns.iter().filter_map(|col| {
             Some(format!(
-                ", foreign key(`{}`) references {}",
+                ", foreign key(`{}`) references {} on delete cascade",
                 col.name,
                 col.fkey.as_ref()?
             ))