mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
f22b30f5c0
Startup is now migrate, apply the configuration, then seed in demo mode, the order in which comparable systems bootstrap identity before content. Seed leaves store.Migrate and becomes a method the server calls after applyConfigurationAtStartup. The seed holds content only. The public demo access token and the MEMO_RELATED row are gone; the reaction list belongs to the configuration. Users are inserted without fixed ids and only when missing, their profile fields are filled only where empty, and every memo, membership, reaction, and attachment references its creator by username. A declared administrator therefore keeps its row, credentials, and display name, and the seeded content attaches to it. A bare --demo start without a configuration seeds the same four users as before. The seed test covers both starts and asserts the seed writes no instance or user settings. Two stale lines of copy are fixed.