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 Where is the configuration saved?.