Is my configuration retained when uninstalling, upgrading or downgrading the app?

Yes, your configuration is retained in the database. On a downgrade, we try to load the latest configuration for that version. For more information about where the configuration is saved, please see here (3.0.x) Where is the configuration saved?.