blob: ec7b6fda0fbd2cef57384954e3cfca27f8a4d0da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def forwards(apps, schema_editor):
Release = apps.get_model('releng', 'Release')
Release.objects.update(last_modified=models.F('created'))
def backwards(apps, schema_editor):
pass
class Migration(migrations.Migration):
dependencies = [
('releng', '0002_release_last_modified'),
]
operations = [
migrations.RunPython(forwards, backwards)
]
|