"""pins.anchor: where a note sits, as a place on the design

Revision ID: f8b0c2d4e6a8
Revises: e6a8b0c2d4f6
Create Date: 2026-09-16

A note's x/y are percentages of the whole page. The page changes height
whenever something on it opens or closes, so an accordion opened above a
note slid the note off the words it was left on, and a reader with a
different set open saw every note somewhere else. The anchor names the
element under the point (a selector unique in the mockup), the point's
place across it and its distance down from its top; the viewer measures it
back live. The percentages stay as the fallback when an element cannot be
found. Empty for every existing note.
"""
from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

revision: str = 'f8b0c2d4e6a8'
down_revision: Union[str, Sequence[str], None] = 'e6a8b0c2d4f6'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.add_column("pins", sa.Column("anchor", sa.JSON(), nullable=True))


def downgrade() -> None:
    op.drop_column("pins", "anchor")
