"""add retracted and retraction_details to global_literature

Revision ID: d7e8f9g0h1i2
Revises: c6d7e8f9g0h1
Create Date: 2026-07-07 20:30:00.000000
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa


revision: str = 'd7e8f9g0h1i2'
down_revision: Union[str, None] = 'c6d7e8f9g0h1'
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('retracted', sa.Boolean(), nullable=False, server_default=sa.text('false')))
    op.add_column('global_literature', sa.Column('retraction_details', sa.JSON(), nullable=True))


def downgrade() -> None:
    op.drop_column('global_literature', 'retraction_details')
    op.drop_column('global_literature', 'retracted')
