diff --git a/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs b/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs index 2105f17cc..b33fb84f3 100644 --- a/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs +++ b/ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs @@ -404,7 +404,9 @@ 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 = tshow onDeleteConstraint _ -> mempty foreignKeyOption = case findForeignKey statements tableName name of Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable } } ->