<reponame>lucasbibianot/inova-cnj-time16<filename>backend/flask-api/migrations/versions/a7e61c6dbd9f_.py<gh_stars>0
"""empty message

Revision ID: <KEY>
Revises: <KEY>
Create Date: 2020-10-17 21:49:34.086380

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>bb7<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    op.execute("insert into tb_desc_evento values (nextval('tb_desc_evento_id_evento_seq'), 'Distribuição para o relator', 'N', 'DRL')")
    op.execute("insert into tb_desc_evento values (nextval('tb_desc_evento_id_evento_seq'), 'Distribuição para o presidente', 'N', 'DPR')")
    op.execute("""
    insert into tb_desc_movimento
    select nextval('tb_desc_movimento_id_movimento_seq'), '26', id_evento
    from tb_desc_evento
    where cd_evento = 'DRL'
    """)
    pass


def downgrade():
    op.execute("delete from tb_desc_evento where cd_evento = 'DRL'")
    op.execute("delete from tb_desc_evento where cd_evento = 'DPR'")
    pass

"""empty message

Revision ID: <KEY>
Revises: <KEY>
Create Date: 2020-10-17 21:49:34.086380

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>bb7<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    op.execute("insert into tb_desc_evento values (nextval('tb_desc_evento_id_evento_seq'), 'Distribuição para o relator', 'N', 'DRL')")
    op.execute("insert into tb_desc_evento values (nextval('tb_desc_evento_id_evento_seq'), 'Distribuição para o presidente', 'N', 'DPR')")
    op.execute("""
    insert into tb_desc_movimento
    select nextval('tb_desc_movimento_id_movimento_seq'), '26', id_evento
    from tb_desc_evento
    where cd_evento = 'DRL'
    """)
    pass


def downgrade():
    op.execute("delete from tb_desc_evento where cd_evento = 'DRL'")
    op.execute("delete from tb_desc_evento where cd_evento = 'DPR'")
    pass
empty message  Revision ID: <KEY> Revises: <KEY> Create Date: 2020-10-17 21:49:34.086380 # revision identifiers, used by Alembic. insert into tb_desc_movimento     select nextval('tb_desc_movimento_id_movimento_seq'), '26', id_evento     from tb_desc_evento     where cd_evento = 'DRL'