2019-02-02 23:53:20 +01:00
|
|
|
from django.db import migrations
|
2017-09-26 00:03:27 +02:00
|
|
|
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
|
|
|
|
from django.db.migrations.state import StateApps
|
|
|
|
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2017-10-26 11:36:30 +02:00
|
|
|
def set_tutorial_status_to_finished(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
|
2017-09-26 00:03:27 +02:00
|
|
|
UserProfile = apps.get_model('zerver', 'UserProfile')
|
2017-11-02 09:17:27 +01:00
|
|
|
UserProfile.objects.update(tutorial_status='F')
|
2017-09-26 00:03:27 +02:00
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
('zerver', '0108_fix_default_string_id'),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.RunPython(set_tutorial_status_to_finished)
|
|
|
|
]
|