- Migration 0008: notes.position (int). Board orders pinned -> position -> updated_at; new notes created at top (max position + 1). POST /api/notes/reorder assigns positions from the given order (owner-scoped). - notes store: position on Note, position-aware sort, optimistic reorder(). - NoteCard reorderable (native HTML5 draggable + dragstart/drop); BoardView moves the dragged note before the drop target and persists. Note: drag on a CSS-columns masonry has imperfect during-drag visuals (columns reflow); order persists correctly. Candidate for a polish pass / layout tweak. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
22 lines
423 B
Python
22 lines
423 B
Python
"""notes.position for manual drag-reorder
|
|
|
|
Revision ID: 0008
|
|
Revises: 0007
|
|
Create Date: 2026-07-20
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "0008"
|
|
down_revision = "0007"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column("notes", sa.Column("position", sa.Integer(), nullable=False, server_default="0"))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("notes", "position")
|