"""clear_perm_cache

Revision: 0159
Revision ID: 2f1187b05f65
Revises: 495c4d953e01
Create Date: 2019-02-15 16:52:40.387789

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2f1187b05f65'
down_revision = '495c4d953e01'
branch_labels = None
depends_on = None


def upgrade():
    conn = op.get_bind()
    conn.execute('UPDATE users SET perm_cache_id = uuid_generate_v4() WHERE is_observer = TRUE')


def downgrade():
    pass
