"""EveAIAsset changes, removing EveAIAssetVersion and other models

Revision ID: af3d56001771
Revises: b1647f31339a
Create Date: 2025-07-02 07:58:10.689637

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

# revision identifiers, used by Alembic.
revision = 'af3d56001771'
down_revision = 'b1647f31339a'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('eve_ai_asset_instruction')
    op.drop_table('eve_ai_processed_asset')
    op.drop_table('eve_ai_asset_version')
    op.add_column('eve_ai_asset', sa.Column('bucket_name', sa.String(length=255), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('object_name', sa.String(length=200), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('file_type', sa.String(length=20), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('file_size', sa.Float(), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('user_metadata', postgresql.JSONB(astext_type=sa.Text()), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('system_metadata', postgresql.JSONB(astext_type=sa.Text()), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('configuration', postgresql.JSONB(astext_type=sa.Text()), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('prompt_tokens', sa.Integer(), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('completion_tokens', sa.Integer(), nullable=True))
    op.add_column('eve_ai_asset', sa.Column('last_used_at', sa.DateTime(), nullable=True))
    op.drop_column('eve_ai_asset', 'valid_to')
    op.drop_column('eve_ai_asset', 'valid_from')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###
