- Page.isFolder (migration 027): folders are content-less pages reusing parentId; folder delete reparents children one level up - Sidebar: Pages group becomes Library; Pinned at top; folder tree; page menu (duplicate/pin/copy link/rename/move/trash); folder menu - /pages index: filterable Library table (all/recent/pinned/untagged) with folder path + last edit (components/library-index.tsx) - Docs: API.md isFolder + folder-delete semantics
8 lines
548 B
SQL
8 lines
548 B
SQL
-- 027_page_folders.sql — Library folders: a folder is a content-less Page
|
|
-- (isFolder) that organizes other pages/folders through the existing parentId
|
|
-- hierarchy. Additive and idempotent; schema.sql carries the identical column,
|
|
-- so this is a structural no-op on a fresh database (db-converge proves both
|
|
-- paths land the same). Deleting a folder reparents its children to the
|
|
-- folder's parent (handled in the API); the FK stays ON DELETE SET NULL.
|
|
|
|
ALTER TABLE "Page" ADD COLUMN IF NOT EXISTS "isFolder" boolean NOT NULL DEFAULT false; |