Skip to content

Commit cebcd61

Browse files
committed
Straightened out some DocHistory timestamps that did not align with the respective DocEvent timestamps. Fixes ietf-tools#1972. Commit ready for merge.
- Legacy-Id: 14056
1 parent 09a7d72 commit cebcd61

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.10.7 on 2017-08-14 13:18
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations
6+
7+
changes = [
8+
[ 'conflict-review-irtf-samrg-common-api', '02', '2013-10-04 10:38:54', '2013-10-04 10:38:52' ],
9+
[ 'conflict-review-irtf-dtnrg-dgram-clayer', '02', '2013-08-25 08:46:03', '2013-08-25 08:45:53' ],
10+
[ 'conflict-review-irtf-dtnrg-dgram-clayer', '01', '2013-08-24 12:25:14', '2013-08-24 12:25:13' ],
11+
[ 'conflict-review-hausenblas-csv-fragment', '02', '2013-10-10 10:17:53', '2013-10-10 10:17:52' ],
12+
[ 'conflict-review-hoffine-already-dotless', '04', '2013-10-10 15:53:14', '2013-10-10 15:53:13' ],
13+
[ 'conflict-review-irtf-sdnrg-layer-terminology', '01', '2014-10-11 06:51:30', '2014-10-11 06:51:29' ],
14+
[ 'conflict-review-gont-dhcpv6-stable-privacy-addresses', '01', '2016-05-18 17:51:58', '2016-05-18 17:51:55' ],
15+
]
16+
17+
def forward(apps, schema_editor):
18+
DocHistory = apps.get_model('doc','DocHistory')
19+
for name, rev, old, new in changes:
20+
DocHistory.objects.filter(name=name,rev=rev,time=old).update(time=new)
21+
22+
23+
def reverse(apps, schema_editor):
24+
DocHistory = apps.get_model('doc','DocHistory')
25+
for name, rev, old, new in changes:
26+
DocHistory.objects.filter(name=name,rev=rev,time=new).update(time=old)
27+
28+
29+
class Migration(migrations.Migration):
30+
31+
dependencies = [
32+
('doc', '0032_auto_20170731_0508'),
33+
]
34+
35+
operations = [
36+
migrations.RunPython(forward,reverse)
37+
]

0 commit comments

Comments
 (0)