Added a conversion function to convert the old database to the new one.