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: Plugin Installation Failing for SQLite Database Type #6

Closed aljawaid closed 1 year ago

aljawaid commented 1 year ago

Found in debug.log: [2023-07-03 09:56:01] [critical] AddressBook: Unable to migrate schema for the plugin: AddressBook => SQLSTATE[HY000]: General error: 1 near "AUTO_INCREMENT": syntax error

Originally posted by @PopovIG in https://github.com/aljawaid/AddressBook/discussions/5#discussioncomment-6341493

aljawaid commented 1 year ago

Hi @PopovIG can you make a manual edit to the schema file and test the change for me to see if it works?

PopovIG commented 1 year ago

I tried version 1.2 - the plugin was displayed and working in the project settings. But there are a couple of new bugs:

  1. When opening a task Internal Error: SQL Error: SQLSTATE[HY000]: General error: 1 ambiguous column name: contacts_id
  2. 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"
aljawaid commented 1 year ago

What do you mean when opening a task? After you assigned contacts to it?

PopovIG commented 1 year ago

No, just after clicking on the task on the board

image

PopovIG 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_contactscontact"

I changed "contacts_id INTEGER KEY NOT NULL" to "contacts_id INTEGER PRIMARY KEY NOT NULL" in Sqlite.php, it fixed this problem