Fix seq generators for enum tables in postgres
This attempts to insert a temporary entry into each enum table until it succeeds. It re-synchronizes the postgres sequence generators with the max id of the table. Fixes #883 and #880
This commit is contained in:
parent
a2001afb1f
commit
30b0101584
22 changed files with 157 additions and 104 deletions
|
@ -38,12 +38,12 @@ def upgrade(tables):
|
|||
|
||||
op.bulk_insert(tables.imagestoragetransformation,
|
||||
[
|
||||
{'id': 2, 'name':'aci'},
|
||||
{'name':'aci'},
|
||||
])
|
||||
|
||||
op.bulk_insert(tables.imagestoragesignaturekind,
|
||||
[
|
||||
{'id': 1, 'name':'gpg2'},
|
||||
{'name':'gpg2'},
|
||||
])
|
||||
|
||||
|
||||
|
|
Reference in a new issue