|
@ -13,22 +13,9 @@ class Migration(migrations.Migration): |
|
|
|
|
|
|
|
|
operations = [ |
|
|
operations = [ |
|
|
migrations.RunSQL(""" |
|
|
migrations.RunSQL(""" |
|
|
update base_autor |
|
|
update django_content_type set |
|
|
set tipo_id = (select id |
|
|
app_label = 'parlamentares', |
|
|
from base_tipoautor |
|
|
model = 'bloco' |
|
|
where content_type_id = (select id |
|
|
where app_label = 'sessao' and model = 'bloco' |
|
|
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') |
|
|
|
|
|
""") |
|
|
|
|
|
] |
|
|
] |
|
|