"""asset v4

Revision ID: ce42d4577562
Revises: 73bc667d7e16
Create Date: 2024-02-27 23:51:10.648610

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

# revision identifiers, used by Alembic.
revision = 'ce42d4577562'
down_revision = '73bc667d7e16'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_asset', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=True)
    op.alter_column('cmf_asset', 'asset_cat_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=True)
    op.alter_column('cmf_asset_cat', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=True)
    op.alter_column('cmf_asset_type', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=True)
    op.alter_column('cmf_asset_type', 'asset_type_cat_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=True)
    op.alter_column('cmf_asset_type_cat', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cmf_asset_type_cat', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=False)
    op.alter_column('cmf_asset_type', 'asset_type_cat_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=False)
    op.alter_column('cmf_asset_type', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=False)
    op.alter_column('cmf_asset_cat', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=False)
    op.alter_column('cmf_asset', 'asset_cat_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=False)
    op.alter_column('cmf_asset', 'parent_id',
               existing_type=sa.VARCHAR(length=64),
               nullable=False)
    # ### end Alembic commands ###
