"""phase12 journey: journey_link

Revision ID: p12f6a7b8c9d0
Revises: p11e5f6a7b8c9
Create Date: 2026-06-14 05:00:00.000000

"""
from typing import Sequence, Union

import sqlalchemy as sa
import sqlmodel
from alembic import op

revision: str = "p12f6a7b8c9d0"
down_revision: Union[str, Sequence[str], None] = "p11e5f6a7b8c9"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

S = sqlmodel.sql.sqltypes.AutoString


def upgrade() -> None:
    op.create_table(
        "journey_link",
        sa.Column("id", S(), nullable=False),
        sa.Column("from_node", S(), nullable=False),
        sa.Column("to_node", S(), nullable=False),
        sa.Column("tone", S(), nullable=False),
        sa.Column("dash", sa.Boolean(), nullable=False),
        sa.Column("sort_order", sa.Integer(), nullable=False),
        sa.PrimaryKeyConstraint("id"),
    )


def downgrade() -> None:
    op.drop_table("journey_link")
