Zapperz0398 / File-Backup-System

A local and (future) cloud backup program written in Python for the CLI
1 stars 0 forks source link

Database Does Not Check Existing Records #5

Open Zapperz0398 opened 1 week ago

Zapperz0398 commented 1 week ago

Code does not check for existing db records, ans attempts to add already added files that have a unique column. This is problematic for a few reasons:

  1. Usage of extra resources: By deleting and adding the database after every run will take time & use additional system resources
  2. Code errors: This happens when the code has been run before and there is an existing .db file.
Zapperz0398 commented 1 week ago

Additional checks will need to be added before a new record is added into the database. Also, a query will need to be made to the db to get the lowest available primary ID number which must then be used for the new record that wants to be. I'm not sure about this though. Maybe we scrap the usage of primary IDs??