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:
Zixuan James Li
2022-05-27 17:33:51 -04:00
committed by Tim Abbott
parent 63e9ae8389
commit d5517932cd
101 changed files with 260 additions and 224 deletions

View File

@@ -1,7 +1,7 @@
# Generated by Django 1.11.18 on 2019-02-13 20:13
from django.db import migrations
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import StateApps
RECIPIENT_STREAM = 2
@@ -13,7 +13,7 @@ SETTINGS_MAP = {
}
def update_notification_settings(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
def update_notification_settings(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None:
Subscription = apps.get_model("zerver", "Subscription")
UserProfile = apps.get_model("zerver", "UserProfile")
@@ -29,7 +29,7 @@ def update_notification_settings(apps: StateApps, schema_editor: DatabaseSchemaE
).update(**update_kwargs)
def reverse_notification_settings(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
def reverse_notification_settings(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None:
Subscription = apps.get_model("zerver", "Subscription")
UserProfile = apps.get_model("zerver", "UserProfile")