mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
typing: Use BaseDatabaseSchemaEditor in place of DatabaseSchemaEditor.
This is a part of #18777. Signed-off-by: Zixuan James Li <359101898@qq.com>
This commit is contained in:
committed by
Tim Abbott
parent
63e9ae8389
commit
d5517932cd
@@ -1,7 +1,7 @@
|
||||
import unicodedata
|
||||
|
||||
from django.db import connection, migrations, models
|
||||
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
|
||||
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
|
||||
from django.db.migrations.state import StateApps
|
||||
|
||||
# There are 66 Unicode non-characters; see
|
||||
@@ -18,7 +18,7 @@ def character_is_printable(character: str) -> bool:
|
||||
return not (unicodedata.category(character) in ["Cc", "Cs"] or character in unicode_non_chars)
|
||||
|
||||
|
||||
def fix_topics(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
|
||||
def fix_topics(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None:
|
||||
Message = apps.get_model("zerver", "Message")
|
||||
BATCH_SIZE = 10000
|
||||
messages_updated = 0
|
||||
|
Reference in New Issue
Block a user