refactor db create/upgrade; supress warnings