datatracker/ietf/message/migrations/0005_copy_docs_m2m_table.py

31 lines
800 B
Python

# Copyright The IETF Trust 2019, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-27 05:56
from __future__ import absolute_import, print_function, unicode_literals
import sys, time
from django.db import migrations
def timestamp(apps, schema_editor):
sys.stderr.write('\n %s' % time.strftime('%Y-%m-%d %H:%M:%S'))
class Migration(migrations.Migration):
dependencies = [
('message', '0004_2_add_docs_m2m_table'),
]
operations = [
#migrations.RunPython(forward, reverse),
migrations.RunPython(timestamp, timestamp),
migrations.RunSQL(
"INSERT INTO message_message_related_docs SELECT * FROM message_messagedocs;",
""
),
migrations.RunPython(timestamp, timestamp),
]