Autosuggest table name for foreign key
- Dominant language
- Python
- Stars
- 485
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
In the table structure view, when adding a new constraint for foreign key, Postico should be able to make an intelligent guess based on table and column name.
e.g. you're editing a table structure for the `orders` table and adding a new foreign key constraint on a column called `customer_id`. The database already has a table called `customers` or `customer` with an `id` field that matches the data type of the current column (`customer_id`). So Postico should be able to connect the dots and the pop-up/modal for adding the foreign key constraint can easily default to the "Referenced Table" being `customers`.
It's probably very easy to implement and would be a nice feature to have.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in Postico's table structure view and the modal for adding a foreign key constraint. Review how available tables and columns are presented, then verify that a matching singular or plural table with a compatible id field is selected as the default referenced table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100