"""not_null_attr_position_ns

Revision: 0243
Revision ID: aa02a8f6f3b1
Revises: 3769937df895
Create Date: 2022-09-15 09:49:27.145744

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


# revision identifiers, used by Alembic.
revision = 'aa02a8f6f3b1'
down_revision = '3769937df895'
branch_labels = None
depends_on = None


def upgrade():
    op.execute("delete from attribute_positions where namespace is null")
    op.alter_column('attribute_positions', 'namespace', nullable=False)


def downgrade():
    pass
