You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
our Oracle db requires partitions for some of the tables, which we used to add using alembic with the following steps. These are based on the proposal of @zzzeekhere (for nicer formatting see here).
It's been a long time since I needed a change in the schema, so I only now realized that there seems to have been a regression / change in behavior.
This rewriter is added as process_revision_directives of context.configure in env.py with the goal of adding the info dict to the create_table statement:
Discussed in #1328
Originally posted by BayerSe October 19, 2023
Hi,
our Oracle db requires partitions for some of the tables, which we used to add using alembic with the following steps. These are based on the proposal of @zzzeek here (for nicer formatting see here).
It's been a long time since I needed a change in the schema, so I only now realized that there seems to have been a regression / change in behavior.
Main code:
This rewriter is added as
process_revision_directives
ofcontext.configure
inenv.py
with the goal of adding theinfo
dict to thecreate_table
statement:We add this to the migration scripts, which adds the partition command to the created statement:
For
alembic==1.6.5
andsqlalchemy==1.3.24
this result in the following auto-generated update command:However, for
alembic==1.12.0
andsqlalchemy==2.0.22
, theinfo
is not added anymore, i.e. I just getI checked version
alembic==1.7.0
as well, it broke between1.6.5
and1.7.0
. In the changelog I found this comment, could that be related?Thanks and regards
Sebastian
The text was updated successfully, but these errors were encountered: