"""clear_cache_private_projects

Revision: 0124
Revision ID: 76df933e43b
Revises: 51c94ea54825
Create Date: 2018-04-11 11:44:58.805986

"""

# revision identifiers, used by Alembic.
revision = '76df933e43b'
down_revision = '51c94ea54825'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    conn = op.get_bind()
    conn.execute('UPDATE projects SET members_cache_id = uuid_generate_v4() FROM organizations o WHERE o.id = projects.owner_id AND o.is_user_org')


def downgrade():
    pass
