Files
zulip/zerver/migrations/0109_mark_tutorial_status_finished.py
Tim Abbott 69ae4931c3 migrations: Use django.db.backends.postgresql.schema.
This replaces django.db.backends.postgresql_psycopg2, which has been
an alias to django.db.backends.postgresql since Django 1.9.
2020-04-26 22:20:24 -07:00

19 lines
569 B
Python

from django.db import migrations
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
def set_tutorial_status_to_finished(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
UserProfile = apps.get_model('zerver', 'UserProfile')
UserProfile.objects.update(tutorial_status='F')
class Migration(migrations.Migration):
dependencies = [
('zerver', '0108_fix_default_string_id'),
]
operations = [
migrations.RunPython(set_tutorial_status_to_finished)
]