Skip to content

Commit

Permalink
Merge pull request #2023 from digitallyinduced/fix-ondelete-constrain…
Browse files Browse the repository at this point in the history
…t-text-ide

fix: remove Just wrapper from foreign key OnDelete display
  • Loading branch information
mpscholten authored Dec 29, 2024
2 parents de92cbb + 9b41617 commit c48c8ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ihp-ide/IHP/IDE/SchemaDesigner/View/Layout.hs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ 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, onDelete = onDeleteConstraint } } -> [hsx|<a href={EditForeignKeyAction tableName name constraintName referenceTable} class="d-block nounderline">FOREIGN KEY: {referenceTable} (On Delete: {tshow onDeleteConstraint})</a>|]
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>|]
_ -> mempty
foreignKeyOption = case findForeignKey statements tableName name of
Just addConstraint@AddConstraint { constraint = ForeignKeyConstraint { name = Just constraintName, referenceTable } } ->
Expand Down

0 comments on commit c48c8ae

Please sign in to comment.