"""add_journal_iso_to_global_literature

Revision ID: d4eaf8b152c0
Revises: 14dd4a3b65b1
Create Date: 2026-07-14 10:11:12.825643
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa


revision: str = 'd4eaf8b152c0'
down_revision: Union[str, None] = '14dd4a3b65b1'
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('journal_iso', sa.String(100), nullable=True))
    op.create_index('ix_gl_journal_iso', 'global_literature', ['journal_iso'])


def downgrade() -> None:
    op.drop_index('ix_gl_journal_iso', table_name='global_literature')
    op.drop_column('global_literature', 'journal_iso')
