2017-09-26 00:03:27 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2017-11-16 00:44:00 +01:00
|
|
|
from django.db import migrations, models
|
2017-09-26 00:03:27 +02:00
|
|
|
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
|
|
|
|
from django.db.migrations.state import StateApps
|
|
|
|
|
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)
|
|
|
|
]
|