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
Issues when using batch_alter_table in parallel using recreate (name of the temp table is not unique) #457
Comments
Michael Bayer (@zzzeek) wrote: why uuid and not the original name of the table itself? |
Michael Bayer (@zzzeek) wrote: uuids are long and cumbersome and make testing more difficult, both for Alembic's own suite as well as for the purpose of validating that a particular batch script remains constant. |
Michael Bayer (@zzzeek) wrote: |
Bastien Gérard (@bagerard) wrote: I'm altering an existing table with the 'recreate' flag thus from what I understand it is creating a temporary table with the name '_alembic_batch_temp' and when it completes, deletes the original table and rename the temporary one. Another possibility is to let me inject the name of the temporary table into the context |
Bastien Gérard (@bagerard) wrote: OK I got what you mean. I wanted to work on it but I see that you already implemented it :) Thx! |
Michael Bayer (@zzzeek) wrote: Append table name to batch temp name The name of the temporary table in batch mode is now generated Change-Id: Idbeabf9558887d3f5525e7045d5de33bab6805a5 → 9b80d35 |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by Bastien Gérard (@bagerard)
Hi,
I recently had the following error when using the batch_alter_table in parallel on different tables of a database. It is due to the name of the temporary table that is not unique and collides.
I'd suggest to append a unique identifier (uuid) to the name of the temp table (_alembic_batch_temp) but perhaps you'll have a better idea. As minor as it is, I'm willing to work on this :)
I'm using MySQL5.5 & alembic 0.9.3
The text was updated successfully, but these errors were encountered: