mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
import_realm: Improve comment about sequencing of imported models.
The comment was outdated, currently we import UserProfiles before realm_tables - because some models in realm_tables have a dependency on UserProfile. Also makes sense to elaborate a bit more in the comment that it's just an outline of the ordering, not an exhaustive list.
This commit is contained in:
committed by
Tim Abbott
parent
0abf60fd01
commit
682a4d6f9e
@@ -902,13 +902,18 @@ def import_uploads(
|
||||
# Importing data suffers from a difficult ordering problem because of
|
||||
# models that reference each other circularly. Here is a correct order.
|
||||
#
|
||||
# (Note that this list is not exhaustive and only talks about the main,
|
||||
# most important models. There's a bunch of minor models that are handled
|
||||
# separately and not mentioned here - but following the principle that we
|
||||
# have to import the dependencies first.)
|
||||
#
|
||||
# * Client [no deps]
|
||||
# * Realm [-notifications_stream]
|
||||
# * UserGroup
|
||||
# * Stream [only depends on realm]
|
||||
# * Realm's notifications_stream
|
||||
# * Now can do all realm_tables
|
||||
# * UserProfile, in order by ID to avoid bot loop issues
|
||||
# * Now can do all realm_tables
|
||||
# * Huddle
|
||||
# * Recipient
|
||||
# * Subscription
|
||||
|
||||
Reference in New Issue
Block a user