'auto-py-to-exe | --onefile generate a new database

I have created a python script with auto-py-to-exe. When I generate a dir the database is inside and everything works fine, but if I generate onefile when executing the script an empty database is generated (in both cases I add the database with add data). What do I have to do so that the database is generated within the .exe?

I have to copy the database along with the exe



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source