One-time migration moves all existing DB files and cache directories
from the flat layout into users/{uid}/ subdirectories. The first user
to log in after the update inherits all existing data. A .migrated
marker file prevents re-running.
Handles WAL/SHM journal files, cross-device moves via copy+delete
fallback, and recursive directory copying.