Skip to main content

bootstrap_default_groups

Function bootstrap_default_groups 

Source
pub async fn bootstrap_default_groups(db: &Db) -> Result<()>
Expand description

Insert each default group with ON CONFLICT (name) DO NOTHING. Idempotent across restarts and against admin-created groups — duplicates by name simply skip without bumping any state.

Gated by RUSTIO_DEMO_MODE=1. Without the flag this is a no-op so production deploys never accidentally seed demo data.