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

Handle custom table name #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

delco97
Copy link

@delco97 delco97 commented Mar 23, 2022

if some models within old_app have a custom db_table attribute the last step related to ALTER TABLE commands fails because the tables names are built from model name following the standard name assigned by django.

This update add the support of -m or --map-new-tab-name option which can be used to set mapping from old table names to new ones only for those with a custom name. Something like:

python manage.py rename_app <old_app_name> <new_app_name> -m "<old_tab_1>=<new_tab_1>" "<old_tab_2>=<new_tab_2>"

Andrea Del Corto and others added 2 commits March 23, 2022 10:27
if some models within old_app have a custom db_table attribute the last step related to ALTER TABLE commands fails because the tables names are built from model name following the standard name assigned by django.

This update add the support of -m or --map-new-tab-name option which can be used to set mapping from old table names to new ones only for those with a custom name. Something like:

`python manage.py rename_app <old_app_name> <new_app_name> -m "<old_tab_1>=<new_tab_1>" "<old_tab_2>=<new_tab_2>"`
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

Successfully merging this pull request may close these issues.

1 participant