"""dettach_github_sync_attrs

Revision: 0240
Revision ID: 130b5c21c344
Revises: 3fa23c3f6c07
Create Date: 2022-05-04 22:32:26.437893

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql


# revision identifiers, used by Alembic.
revision = '130b5c21c344'
down_revision = '3fa23c3f6c07'
branch_labels = None
depends_on = None


def upgrade():
    op.execute("""
        UPDATE attributes SET is_from_integration = null WHERE is_from_integration = 'github' AND integration_ref IN ('labels', 'assignees', 'milestone')
    """)


def downgrade():
    pass
