Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
85901939
Unverified
Commit
85901939
authored
5 years ago
by
Andrew Morgan
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Fix error when using synapse_port_db on a vanilla synapse db (#6449)
parents
2aa89438
768b8440
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/6449.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/6449.bugfix
scripts/synapse_port_db
+4
-1
4 additions, 1 deletion
scripts/synapse_port_db
with
5 additions
and
1 deletion
changelog.d/6449.bugfix
0 → 100644
+
1
−
0
View file @
85901939
Fix error when using synapse_port_db on a vanilla synapse db.
This diff is collapsed.
Click to expand it.
scripts/synapse_port_db
+
4
−
1
View file @
85901939
...
@@ -782,7 +782,10 @@ class Porter(object):
...
@@ -782,7 +782,10 @@ class Porter(object):
def
_setup_state_group_id_seq
(
self
):
def
_setup_state_group_id_seq
(
self
):
def
r
(
txn
):
def
r
(
txn
):
txn
.
execute
(
"
SELECT MAX(id) FROM state_groups
"
)
txn
.
execute
(
"
SELECT MAX(id) FROM state_groups
"
)
next_id
=
txn
.
fetchone
()[
0
]
+
1
curr_id
=
txn
.
fetchone
()[
0
]
if
not
curr_id
:
return
next_id
=
curr_id
+
1
txn
.
execute
(
"
ALTER SEQUENCE state_group_id_seq RESTART WITH %s
"
,
(
next_id
,))
txn
.
execute
(
"
ALTER SEQUENCE state_group_id_seq RESTART WITH %s
"
,
(
next_id
,))
return
self
.
postgres_store
.
runInteraction
(
"
setup_state_group_id_seq
"
,
r
)
return
self
.
postgres_store
.
runInteraction
(
"
setup_state_group_id_seq
"
,
r
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment