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

add prefix/suffix if ent reserved words are detected #30

Open
thmeitz opened this issue Apr 21, 2022 · 1 comment
Open

add prefix/suffix if ent reserved words are detected #30

thmeitz opened this issue Apr 21, 2022 · 1 comment

Comments

@thmeitz
Copy link

thmeitz commented Apr 21, 2022

Actual
A DB has a clients table that collides with ent.Client and a subsequent change to the ent.Schema is necessary to fix the error.

Suggestion
When importing an existing database with entimport, there should be a prefix (or suffix) for the generated methods.
In the configuration for entimport there should be an option to specify the prefix.

Example
prefix: legacy
table: clients
Result: LegacyClient

@zeevmoney
Copy link
Contributor

Hi @thmeitz,

I actually wanted to optionally prefix the database "schema" name, but I also like this idea of custom prefix.
Suggested it in here: #29
I will take your idea into consideration when implementing the feature and add it to the relevant roadmap section. If you want, contributions are always welcome, I'm in the discord, and happy to provide any support.

@zeevmoney zeevmoney mentioned this issue Apr 21, 2022
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants