From 6907c4a259887ddabf4fd2080f49eaf0a1665a01 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 17 May 2019 15:39:12 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20outra=20migra=C3=A7=C3=A3o=20para=20?= =?UTF-8?q?consertar=20commit=2054c6b38?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0029_auto_20190517_1531.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sapl/parlamentares/migrations/0029_auto_20190517_1531.py diff --git a/sapl/parlamentares/migrations/0029_auto_20190517_1531.py b/sapl/parlamentares/migrations/0029_auto_20190517_1531.py new file mode 100644 index 000000000..ef24afd91 --- /dev/null +++ b/sapl/parlamentares/migrations/0029_auto_20190517_1531.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-05-17 18:31 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('parlamentares', '0028_auto_20190515_1744'), + ] + + operations = [ + migrations.RunSQL(""" + update base_autor + set tipo_id = (select id + from base_tipoautor + where content_type_id = (select id + from django_content_type + where app_label = 'parlamentares' and model = 'bloco')) + where tipo_id = (select id + from base_tipoautor + where content_type_id = (select id + from django_content_type + where app_label = 'sessao' and model = 'bloco')); + """), + migrations.RunSQL(""" + delete from base_tipoautor + where content_type_id = (select id + from django_content_type + where app_label = 'sessao' and model = 'bloco') + """) + ]