Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to opt out from special naming when fieldname ends with _id #355

Open
1 task done
Henkhogan opened this issue Jan 3, 2025 · 0 comments
Open
1 task done

Comments

@Henkhogan
Copy link

Henkhogan commented Jan 3, 2025

Things to check first

  • I have searched the existing issues and didn't find my feature already requested there

Feature description

The code part that will handle FKs on field names that end with _id is simply driving me nuts because it can lead to incinsitent naming on parent and child tables.

if len(column_names) == 1 and column_names[0].endswith("_id"):

Please add a n option to opt-out from it

Use case

I have all my tables prefix with t_ in my db so that they are renamed like

t_child -> TChild
t_parent -> TParent

if I know have a field parent_id on the child table, I will end up with

"parent" as FK on the child table
and
"t_child" as FK on the parent table

which is inconsitent IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant