Ver código fonte

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

Kestrel 1 ano atrás
pai
commit
c60c21256c
1 arquivos alterados com 1 adições e 1 exclusões
  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()?
             ))