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

do not override db_table #55

Open
davekaro opened this issue Feb 16, 2017 · 3 comments
Open

do not override db_table #55

davekaro opened this issue Feb 16, 2017 · 3 comments

Comments

@davekaro
Copy link
Contributor

Can you explain the reasoning for why db_table is being overridden in all the models instead of using the default of app_label + model name?

@jwhitlock
Copy link
Member

When the models were moved from models.py to a models folder, Django wanted to change the names from multigtfs_feed to models_feed. With the addition of app_label, this may have changed to multigtfs_models_feed, and db_table was needed to keep the existing table names.

It is possible this was fixed in later Django versions (https://code.djangoproject.com/ticket/3591 was closed 3 years ago), and explicitly setting db_table is now unneeded. The experiment would be to remove it and see what ./manage.py makemigrations multigtfs does.

@davekaro
Copy link
Contributor Author

Ah very interesting thanks for the explanation. If I give that a try - would you want a PR for that?

@jwhitlock
Copy link
Member

yes, I'll review the PR.

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