"""041_add_terminology_oid

Revision ID: c4c3c36b720d
Revises: 0fc14c2cfe41
Create Date: 2025-08-28 16:41:33.977242

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'c4c3c36b720d'
down_revision = '0fc14c2cfe41'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###

    op.add_column('terminology', sa.Column('oid', sa.BigInteger(), nullable=True))

    op.execute('update terminology set oid=1 where oid is null')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('terminology', 'oid')
    
    # ### end Alembic commands ###
