Skip to content

Commit c48c8ae

Browse files
authored
Merge pull request #2023 from digitallyinduced/fix-ondelete-constraint-text-ide
fix: remove Just wrapper from foreign key OnDelete display
2 parents de92cbb + 9b41617 commit c48c8ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ renderColumn Column { name, columnType, defaultValue, notNull, isUnique } id tab
404404
Just value -> [hsx|default: {compileExpression value} |]
405405
Nothing -> mempty
406406
renderForeignKey = case findForeignKey statements tableName name of
407-
Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable, onDelete = onDeleteConstraint } } -> [hsx|<a href={EditForeignKeyAction tableName name constraintName referenceTable} class="d-block nounderline">FOREIGN KEY: {referenceTable} (On Delete: {tshow onDeleteConstraint})</a>|]
407+
Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable, onDelete = onDeleteConstraint } } -> [hsx|<a href={EditForeignKeyAction tableName name constraintName referenceTable} class="d-block nounderline">FOREIGN KEY: {referenceTable} (On Delete: {maybe "" tshow onDeleteConstraint})</a>|]
408408
_ -> mempty
409409
foreignKeyOption = case findForeignKey statements tableName name of
410410
Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable } } ->

0 commit comments

Comments
 (0)