Questions tagged [sqlalchemy-continuum]

SQLAlchemy-Continuum is a versioning and auditing extension for SQLAlchemy.

NOTE: PLEASE report bugs / advanced issues on the official issue tracker - much more comprehensive help for complex issues is available there.

Official resources

Features

  • Creates versions for inserts, deletes and updates
  • Does not store updates which don't change anything
  • Supports alembic migrations
  • Can revert objects data as well as all object relations at given transaction even if the object was deleted
  • Transactions can be queried afterwards using SQLAlchemy query syntax
  • Query for changed records at given transaction
  • Temporal relationship reflection. Version object's relationship show the parent objects relationships as they where in that point in time.
  • Supports native versioning for PostgreSQL database (trigger based versioning)
11 questions
5
votes
0 answers

`sqlalchemy.exc.InvalidRequestError: Implicitly combining column(...)` in joined table inheritance scenario when using SQLAlchemy-Continuum extension

When I tried to version tables from Kotti project using SQLAlchemy-Continuum extension to SQLAlchemy I encountered sqlalchemy.exc.InvalidRequestError: Implicitly combining column(...) error. These tables model inheritance using joined table…
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
4
votes
1 answer

Using sqlalchemy-continuum with flask-sqlalchemy and flask-migrate

I'm trying to get sqlalchemy-continuum to work alongside flask-sqlalchemy and flask-migrate. My __init__.py file looks like this: import os from flask import Flask def create_app(): """Create and configure an instance of the Flask…
N.Jones
  • 149
  • 1
  • 13
2
votes
0 answers

sqlalchemy-continuum with Automap Base

I am trying to integrate SqlAlchemy with SQLAlchemy-continuum. I use Automap feature instead of making declarative classes, I have been unable to use continuum with the automap feature. Also there are no examples or citations in the docs regarding…
Milan
  • 403
  • 2
  • 8
2
votes
1 answer

SqlAlchemy Continuum: history and transaction tables are not created

I am trying to integrate sqlalchemy-continuum versioning into an existing application that uses flask-sqlalchemy. I have a __versioned__ = {} to the models I want to have versioned e.g.: class User(Base): __versioned__ = {} __tablename__ =…
2
votes
2 answers

How to use the User column for transactions?

I got a recommendation to use sqlalchemy-continuum, which seems to do very much what I want out of the box. By default, the ORM assumes that there is a user column. I do indeed want to save originators of an edit, but the documentation only says…
Anaphory
  • 6,045
  • 4
  • 37
  • 68
1
vote
0 answers

SQLAlchemy-Continuum how to make changes made in many-to-many relationship present in changeset

I'm trying to track changes in many-to-many relationship using SQLAlchemy-Continuum package. Unfortunately only changes made to simple fields like db.String are present in the changeset. How to make changes made to relationship fields present in the…
stasiekz
  • 1,775
  • 5
  • 22
1
vote
0 answers

Where to call sqlalchemy configure_mappers with multiple Python modules

I have a multiple class sqlalchemy implemented model. It spans multiple Python modules and includes relationships that reach across those modules as well. I want to add versioning to my model and I've decided to use sqlalchemy-continuum. In…
rsgmon
  • 1,892
  • 4
  • 23
  • 35
1
vote
1 answer

How to display versioned data (SQLAlchemy-Continuum) in Flask-admin

I'm using SQLAlchemy-Continuum for versioning the data records of one of my sqlalchemy-objects. Examplecode: class Assessment(db.Model): __versioned__ = {} __tablename__ = "assesment_table" id = db.Column(db.Integer, primary_key=True) rating =…
Simon
  • 317
  • 3
  • 17
1
vote
2 answers

How to resolve utf-8 error when using odo function ? OperationalError: (sqlite3.OperationalError) Could not decode to UTF-8 column

I am new to odo. I have a simple function for migrating databases: from blaze import Data, odo, like def migrate(source, target, table_names=None): src_db = Data(source) tbl_names = (src_db.fields, table_names)[table_names is not None] …
Rahuketu86
  • 475
  • 2
  • 6
  • 17
1
vote
2 answers

SQLAlchemy-Continuum and Pyramid: UnboundExecutionError

I have a Pyramid application that does CRUD with SQLAlchemy via pyramid_basemodel. All seems to work nicely. I then pip installed SQLAlchemy-Continuum, to provide history for certain objects. All I did to configure it was make the following…
Rob Grant
  • 7,239
  • 4
  • 41
  • 61
0
votes
0 answers

Can I add a custom column to the 'transaction' table automatically generated by SQLAlchemy-Continuum for audit trail?

I've successfully performed a log of an UPDATE action of a PostgreSQL database using SQLAlchemy ORM. Firstly, using Alembic, I've migrated the automatically generated 'XXX_version' (where XXX is the name of the original table) and 'transaction'…