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
|
@ -16,9 +16,9 @@ import sqlalchemy as sa
|
|||
def upgrade(tables):
|
||||
op.bulk_insert(tables.externalnotificationmethod,
|
||||
[
|
||||
{'id':4, 'name':'flowdock'},
|
||||
{'id':5, 'name':'hipchat'},
|
||||
{'id':6, 'name':'slack'},
|
||||
{'name':'flowdock'},
|
||||
{'name':'hipchat'},
|
||||
{'name':'slack'},
|
||||
])
|
||||
|
||||
def downgrade(tables):
|
||||
|
|
Reference in a new issue