Skip to content
Snippets Groups Projects
Select Git revision
  • bced419b694e6fe49b1dd74b081adef169956658
  • main default protected
  • renovate/django-5.x
  • renovate/beautifulsoup4-4.x
  • renovate/django-tex-1.x
  • renovate/jsonschema-4.x
  • renovate/djangorestframework-3.x
  • renovate/django-bootstrap5-25.x
  • renovate/django-debug-toolbar-6.x
  • koma/feature/preference-polling-form
10 results

0004_rework_virtual_3.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    0004_rework_virtual_3.py 691 B
    # Generated by Django 4.1.5 on 2023-03-21 23:21
    
    from django.db import migrations
    
    
    
    class Migration(migrations.Migration):
    
        atomic = False
    
        dependencies = [
            ('AKOnline', '0003_rework_virtual_2'),
        ]
    
        def copy_rooms(apps, schema_editor):
            VirtualRoomOld = apps.get_model('AKOnline', 'VirtualRoomOld')
            VirtualRoom = apps.get_model('AKOnline', 'VirtualRoom')
            for row in VirtualRoomOld.objects.all():
                v = VirtualRoom(room_id=row.pk, url=row.url)
                v.save()
    
        operations = [
            migrations.RunPython(
                copy_rooms,
                reverse_code=migrations.RunPython.noop,
                elidable=True,
            )
        ]