add curl at the beginning for removing the old schemas and rename the database back to the original name