def move_dates(apps, schema_editor):
    """Move dates to models."""
    RelayDomain = apps.get_model('relaydomains', 'RelayDomain')
    for model in [RelayDomain]:
        for instance in model.objects.all():
            instance.creation = instance.dates.creation
            instance.last_modification = instance.dates.last_modification
            instance.save()
