Skip to content

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

Closed as not planned

Description

@ztane

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?

Activity

  1. ztane commented on Nov 29, 2015

    @ztane
    Author

    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.

  2. ztane commented on Nov 29, 2015

    @ztane
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions