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
I can successfully create all tables by using Base.metadata.create_all. However when I try to insert a record into one of the tables, I receive an error when it tries to insert into the version table: ORA-32795: cannot insert into a generated always identity column
I can work around this by specifying always=False for the id column. (This is not ideal since I'd rather use always=True to express the intent that I never plan to manually set a value for the primary key.) Now I can insert records and records are also successfully inserted into the version tables. However, I still have a problem with Alembic.
When I try using Alembic to autogenerate the revision for the tables I receive the following error: sqlalchemy.exc.ArgumentError: A column with an Identity object cannot specify autoincrement=False
I'm using the Identity object from SQLAlchemy to specify the default value of primary keys.
I can successfully create all tables by using Base.metadata.create_all. However when I try to insert a record into one of the tables, I receive an error when it tries to insert into the version table:
ORA-32795: cannot insert into a generated always identity column
I can work around this by specifying
always=False
for the id column. (This is not ideal since I'd rather usealways=True
to express the intent that I never plan to manually set a value for the primary key.) Now I can insert records and records are also successfully inserted into the version tables. However, I still have a problem with Alembic.When I try using Alembic to autogenerate the revision for the tables I receive the following error:
sqlalchemy.exc.ArgumentError: A column with an Identity object cannot specify autoincrement=False
I'd appreciate any help anyone can offer.
Python 3.12.0
SQLAlchemy 2.0.36
SQLAlchemy-Continuum 1.4.2
Alembic 1.13.3
The text was updated successfully, but these errors were encountered: