Skip to content

Commit

Permalink
Merge pull request #2018 from digitallyinduced/show-ondelete-constrai…
Browse files Browse the repository at this point in the history
…nt-in-schema-designer

Show On Delete constraint in the schema designer
  • Loading branch information
mpscholten authored Dec 9, 2024
2 parents ad90fc2 + 4bddf80 commit d61b491
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 } } -> [hsx|<a href={EditForeignKeyAction tableName name constraintName referenceTable} class="d-block nounderline">FOREIGN KEY: {referenceTable}</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: {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 d61b491

Please sign in to comment.