kvesteri / sqlalchemy-continuum

Versioning extension for SQLAlchemy.
BSD 3-Clause "New" or "Revised" License
578 stars 127 forks source link

Hybrid native/non-native versioning support #314

Open achalagarwal opened 2 years ago

achalagarwal commented 2 years ago

Hi, I would like to support both native and non-native versioning in my codebase.

i.e. some models use native versioning and others don't.

I tried using multiple versioning managers and specifying the version manager for each model, after making some changes in the sqlalchemy-continuum codebase, I was able to get the migrations to work correctly.

However I am facing an issue when I update an object, the issue is that I get sqlalchemy object already exists for the Transaction model. I assume this is because both the versioning mechanisms are kicking in when I update an object and that causes an issue.

What would you recommend as the right approach?


My objective to use non-native versioning is for the in-app plugins (which for obvious reasons cannot be achieved in native versioning)