"""

Revision ID: b4d509e2b27b
Revises: f988852b4ab6
Create Date: 2026-06-18 18:37:09.768262

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'b4d509e2b27b'
down_revision: Union[str, Sequence[str], None] = 'f988852b4ab6'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('embers',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('entry_id', sa.Integer(), nullable=False),
    sa.Column('filename', sa.String(length=255), nullable=False),
    sa.ForeignKeyConstraint(['entry_id'], ['entries.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('entry_id')
    )
    op.create_index(op.f('ix_embers_id'), 'embers', ['id'], unique=False)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_embers_id'), table_name='embers')
    op.drop_table('embers')
    # ### end Alembic commands ###
