mirror of https://github.com/jumpserver/jumpserver
22 lines
486 B
Python
22 lines
486 B
Python
|
# Generated by Django 4.1.10 on 2023-09-27 06:56
|
||
|
|
||
|
from django.db import migrations
|
||
|
|
||
|
|
||
|
def migrate_user_default_email(apps, *args):
|
||
|
user_cls = apps.get_model('users', 'User')
|
||
|
user_cls.objects\
|
||
|
.filter(email='admin@mycomany.com')\
|
||
|
.update(email='admin@example.com')
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('users', '0045_delete_usersession'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RunPython(migrate_user_default_email),
|
||
|
]
|