Issues regarding renaming of table name #1132
Unanswered
ankitkpandey1
asked this question in
Usage Questions
Replies: 1 comment
-
Hi
This is not limited to rename table, pretty much every migration operation is not replayable on a database that's already updated for similar reasons If you plan on creating a database from scratch using You can use the stamp command for it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
There is a use case where I need to rename a table name. Since alembic doesn't support detection of renamed tables (via auto generate), I custom wrote a migration script that calls
op.rename_table
. This worked fine for the running system which had table named initially as X and after migration, got changed to Y.There is a problem if I want to use this script for a fresh system (which doesn't have any notion of Table X as it is renamed now), it fails as it tries to access non existing table X.
I would be glad if someone can suggest a better approach or any alteration to the current one.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions