diff --git a/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs b/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs
index 2105f17cc..3d83cb7c1 100644
--- a/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs
+++ b/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs
@@ -404,7 +404,16 @@ renderColumn Column { name, columnType, defaultValue, notNull, isUnique } id tab
Just value -> [hsx|default: {compileExpression value} |]
Nothing -> mempty
renderForeignKey = case findForeignKey statements tableName name of
- Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable } } -> [hsx|FOREIGN KEY: {referenceTable}|]
+ Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable, onDelete = onDeleteConstraint } } -> [hsx|FOREIGN KEY: {referenceTable} (On Delete: {onDeleteText})|]
+ where
+ onDeleteText :: Text
+ onDeleteText = case onDeleteConstraint of
+ Just NoAction -> "No Action"
+ Just Restrict -> "Restrict"
+ Just SetNull -> "Set Null"
+ Just SetDefault -> "Set Default"
+ Just Cascade -> "Cascade"
+ Nothing -> "No Action"
_ -> mempty
foreignKeyOption = case findForeignKey statements tableName name of
Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable } } ->