Skip to content
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

The documentation is unclear about native versioning's use of temporary_transaction table #114

Open
ztane opened this issue Nov 17, 2015 · 2 comments

Comments

@ztane
Copy link

ztane commented Nov 17, 2015

The documentation is unclear about native versioning's use of temporary_transaction table. Furthermore, should the temporary_transaction table be missing, even no warning is emitted.

I am using (trying to use) SA-C'nuum with Pyramid / SQLAlchemy / zope.transaction extension, with make_versioned(options=dict(native_versioning=True)); Alembic autogeneration works, triggers are created correctly, but seemingly nothing creates the temporary_transaction implicitly. Took a while even to find out why nothing is being versioned.

The docs should be clarified about this. Furthermore, which SQLAlchemy event is supposed to trigger the creation of the temp table?

@ztane
Copy link
Author

ztane commented Nov 29, 2015

I looked into this again, and the transaction table does indeed have transactions, even though no changes are recorded.

I suspect this occurs because I am using alembic migrations with native versioning; the create_triggers of transaction.py is never called in that case.

@ztane
Copy link
Author

ztane commented Nov 29, 2015

I succeeded in creating the transaction table properly along with its trigger in an alembic migration with

conn = op.get_bind()
Transaction = foo.models.Base._decl_class_registry.get('Transaction')
Transaction.__table__.create(bind=conn)

instead of autogenerated alembic migration. This of course was not documented at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant