Sfoglia il codice sorgente

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

Kestrel 1 anno fa
parent
commit
c60c21256c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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()?
             ))