Skip to content

Missing batch_op.f() #1458

Apr 17, 2024 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

the f() operation can always be from op.f() and it's not needed for those FK names. op.f() is only needed when the naming convention uses the "%(constraint_name)s" token, to indicate this name is already translated.

names like ""fk_single_source_of_truth_solar_pv_version_id_file_version" that are DROPs here came directly from your database, which in this case would be the SQLite database. So if those names are then too long for MySQL, this is not a directly supported use case for alembic, alembic assumes autogen migrations would be created against the specific type of database that is used for production operations. so you would need to manually specify these constraint names in your code.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@zzzeek
Comment options

Answer selected by quentin-roche
@quentin-roche
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #1457 on April 17, 2024 17:01.