The legacy method does not work any longer, so just use the Flask manage script and remove the obsolete legacy one.