"""add license_info, pre_extracted_data, is_negative_result to global_literature

Revision ID: c49ec3790171
Revises: d7e8f9g0h1i2
Create Date: 2026-07-07 23:15:37.190643
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa


revision: str = 'c49ec3790171'
down_revision: Union[str, None] = 'd7e8f9g0h1i2'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column('global_literature', sa.Column('license_info', sa.JSON(), nullable=True))
    op.add_column('global_literature', sa.Column('pre_extracted_data', sa.JSON(), nullable=True))
    op.add_column('global_literature', sa.Column('is_negative_result', sa.Boolean(), nullable=False, server_default=sa.text('false')))
    op.add_column('global_literature', sa.Column('negative_result_details', sa.JSON(), nullable=True))


def downgrade() -> None:
    op.drop_column('global_literature', 'negative_result_details')
    op.drop_column('global_literature', 'is_negative_result')
    op.drop_column('global_literature', 'pre_extracted_data')
    op.drop_column('global_literature', 'license_info')
