pgadmin-org / pgadmin-org/pgadmin4
Create self-referencing foreign keys during table creation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
Right now, during the creation of a table you can add the foreign key constraint to columns within your table. While this works for foreign keys that reference other tables, you are unable to a column within the table being created. This would be useful for when a parent-child relationship is needed, such as a nested comment or a manager and employees, where different columns would link with each other
Right now you need to create the table and add the constraints afterwards, this would be a simple QOL feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files, tests, or entry points. Start by locating pgAdmin's table-creation flow and its foreign-key constraint handling, then trace how references to other tables are generated. Done means a table can be created with a foreign key whose referenced columns belong to that same table, covering parent-child relationships.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100