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
Container Registry
Model registry
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
Maunium
synapse
Commits
d7d24750
Commit
d7d24750
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix port script for user directory tables
parent
514c2d3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/synapse_port_db
+18
-0
18 additions, 0 deletions
scripts/synapse_port_db
with
18 additions
and
0 deletions
scripts/synapse_port_db
+
18
−
0
View file @
d7d24750
...
...
@@ -252,6 +252,24 @@ class Porter(object):
)
return
if
table
in
(
"
user_directory
"
,
"
user_directory_search
"
,
"
users_who_share_rooms
"
,
"
users_in_pubic_room
"
,
):
# We don't port these tables, as they're a faff and we can regenreate
# them anyway.
self
.
progress
.
update
(
table
,
table_size
)
# Mark table as done
return
if
table
==
"
user_directory_stream_pos
"
:
# We need to make sure there is a single row, `(X, null)`
yield
self
.
postgres_store
.
_simple_insert
(
table
=
table
,
values
=
{
"
stream_id
"
:
None
},
)
self
.
progress
.
update
(
table
,
table_size
)
# Mark table as done
return
forward_select
=
(
"
SELECT rowid, * FROM %s WHERE rowid >= ? ORDER BY rowid LIMIT ?
"
%
(
table
,)
...
...
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