aljawaid / AddressBook

A dedicated Address Book for projects and tasks in Kanboard. Add custom properties to standardise a relationship between tasks and people or organisations.
MIT License
9 stars 2 forks source link

Bug: SQLite Error When Deleting Contact #9

Closed aljawaid closed 1 year ago

aljawaid commented 1 year ago

When deleting a contact Internal Error: SQL Error: SQLSTATE[HY000]: General error: 1 foreign key mismatch - "address_book_contacts_task_has_contact" referencing "address_book_contacts_contact"

Originally posted by @PopovIG in https://github.com/aljawaid/AddressBook/issues/6#issuecomment-1618129357

aljawaid commented 1 year ago

https://github.com/aljawaid/AddressBook/issues/6#issuecomment-1618232835

@PopovIG Are you sure making the change of PRIMARY doesnt cause a problem when editig or saving contacts/properties? Because previously it created an issue for MySQL so I removed it for all database types

PopovIG commented 1 year ago

I just re-tested. Everything works correctly. At least in the project settings. I'm not sure if this is the correct solution, but it works =)

aljawaid commented 1 year ago

Haha I will edit the code and mark it as a solution tonight....until another error is reported lol