Sistema de Informações Gerenciais do Interlegis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
730 B

# Generated by Django 5.2.1 on 2025-08-29 13:47
from django.db import migrations
SQL_STMT = """
DO $$
BEGIN
create view viw_eventos_participante as
select ep.evento_id as id_evento,
ep.casa_legislativa_id as id_casa,
ep.cpf,
ep.nome,
ep.email,
ep.local_trabalho
from eventos_participante ep;
if exists (select 1 from pg_roles where rolname = 'sigi_qs') then
grant select on viw_eventos_participante to sigi_qs;
end if;
END $$
"""
SQL_REVERSE_STMT = "DROP VIEW viw_eventos_participante;"
class Migration(migrations.Migration):
dependencies = [
("eventos", "0065_participantes_visitas"),
]
operations = [migrations.RunSQL(sql=SQL_STMT, reverse_sql=SQL_REVERSE_STMT)]