Skip to content

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

Open
@Henkhogan

Description

@Henkhogan

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 inconsitent 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 now 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions