PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

BUG: reset_database.py does not delete the actual application database

Open AbiramiR-27 opened this issue 4 months ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

What happened?

What happened?

The database reset script backend/reset_database.py attempts to find and delete database files using glob.glob("app/database/*.db"):

def delete_db_files():
    db_files = glob.glob("app/database/*.db")
    for db_file in db_files:
        # ... deletes file

However, the actual application database is stored in the system's local user data directory as defined in backend/app/config/settings.py:

DATABASE_PATH = os.path.join(user_data_dir("PictoPy"), "database", "PictoPy.db")

Because the script looks in the wrong folder (backend/app/database/*.db contains only python files), it never finds the real database file and is completely non-functional when run.

Proposed Fix: Import DATABASE_PATH from app.config.settings inside reset_database.py and delete that file/path.

I wish to work on this issue !

AbiramiR-27 avatar Jul 13 '26 10:07 AbiramiR-27

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Jul 13 '26 10:07 github-actions[bot]

@rohan-pandeyy Can you check the need of this issue & assign me ??

AbiramiR-27 avatar Jul 14 '26 03:07 AbiramiR-27