Skip to content

How to create foreign keys with custom names #7414

Answered by rikinsk
nizamani asked this question in Question
Discussion options

You must be logged in to vote

@nizamani This is currently not possible to do while creating a foreign key. Shall take this as a feature request.

In the meanwhile, you can rename the created foreign key form the SQL tab of the console by running the following query:

ALTER TABLE "<name>" RENAME CONSTRAINT "<old_fkey_name>" TO "<new_fkey_name>";

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nizamani
Comment options

Answer selected by motleydev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants