8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-08 10:56:27 +00:00

Delete old migration

This commit is contained in:
Jean-Romain Garnier 2020-04-17 17:37:47 +02:00 committed by Jean-Romain Garnier
parent 43eadaa712
commit 1484b6ec1e
2 changed files with 6 additions and 26 deletions

View file

@ -1,26 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-04-16 22:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0084_auto_20191120_0159'),
]
def flag_verified(apps, schema_editor):
db_alias = schema_editor.connection.alias
users = apps.get_model("users", "User")
users.objects.using(db_alias).all().update(email_state=0)
operations = [
migrations.AddField(
model_name='user',
name='email_state',
field=models.IntegerField(choices=[(0, 'Verified'), (1, 'Unverified'), (2, 'Waiting for email confirmation')], default=2),
),
migrations.RunPython(flag_verified),
]

View file

@ -11,10 +11,16 @@ class Migration(migrations.Migration):
('users', '0084_auto_20191120_0159'),
]
def flag_verified(apps, schema_editor):
db_alias = schema_editor.connection.alias
users = apps.get_model("users", "User")
users.objects.using(db_alias).all().update(email_state=0)
operations = [
migrations.AddField(
model_name='user',
name='email_state',
field=models.IntegerField(choices=[(0, 'Verified'), (1, 'Unverified'), (2, 'Waiting for email confirmation')], default=2),
),
migrations.RunPython(flag_verified),
]