Remove reference to dbname, fixes #4970
Fix migration err when menu nodes cannot be found