Skip to content

History Meta - issue with unique columns in the auto-generated history table. #11339

Closed Answered by zzzeek
mmssix asked this question in Usage Questions
Discussion options

You must be logged in to vote

modify the recipe to disable unique on indexes in the history table:

diff --git a/examples/versioned_history/history_meta.py b/examples/versioned_history/history_meta.py
index 3f26832b9..e4c102c0a 100644
--- a/examples/versioned_history/history_meta.py
+++ b/examples/versioned_history/history_meta.py
@@ -59,6 +59,7 @@ def _history_mapper(local_mapper):
         for idx in history_table.indexes:
             if idx.name is not None:
                 idx.name += "_history"
+            idx.unique = False
 
         for orig_c, history_c in zip(
             local_mapper.local_table.c, history_table.c

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mmssix
Comment options

Answer selected by mmssix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants