Description:
I would like to see an existing FK column in the Child Table, but do not want to see the Relationship. How can I do that? Also, can I drop a Relationship, but keep the FK Column?
Solution:
These are two separate parts - one is where the Relationship is not dropped, simply hidden whereas in the second one, the Relationship is physically deleted (dropped). For the first part the solution is as follows:
Solution 1 - Hiding the Relationship while still showing the migrated Column(s):
1. Switch to the Physical side.
2. Highlight the Relationship, Right Mouse Click and select Properties.
3. Deselect "Generate" in the check box and close properties window. This will filter out that FK constraint and its syntax will not be generated.
4. Right Mouse Click on a blank area in the Diagram display and select Properties.
5. In the 'Relationship' tab (there are two tabs, one Relationships and the other one Relationship, click on the second one) and deselect the check mark in the box for "Display Ungenerated Relationships" so that ungenerated Relationships are hidden.
Now you will see FK columns are in the Child Table, but the Relationship will not be visible. Also, there will be no FK Constraint syntax generated for that Relationship. You can verify it by checking the syntax in Schema (Forward Engineering) | Preview. You will see there is no FK constraint in the DDL.
Solution 2 - Deleting a Relationship, but keeping the migrated Column(s):
With release 2021 R1 of erwin DM, it is now possible to delete a Relationship without dropping the migrated Column(s); of course those will now be stand alone Column(s). Here is how to do it:
1. Switch to the Physical side.
2. Highlight the Relationship and delete
3. Select "No" from the pop up message
4. The FK will be kept without a Relationship
Original Model (with two Relationships and two FKs)
Deleted One Relationship - notice the Check box to retain the migrated FK:
The Migrated Column 'CUST_number' is still retained (as a stand alone Column now)