pub fn migrate_host_settings(conn: &Connection)Expand description
Migrate host settings from DB legacy storage to config file. Called from install and config commands, not on every connection.
- If config lacks hostname, read from DB (legacy “original_hostname”), then delete from DB.
- If config hostname doesn’t match live hostname, move old to aliases and update.
- If config lacks machine_id, generate one.