Open matejzero opened 1 year ago
Interesting. If you're interested in the DB structure, it's outlined here:
https://github.com/phpList/phplist3/blob/main/public_html/lists/admin/structure.php
I guess adding an ID with auto_increment may work. If you do so, it would be interesting to report your findings so that more people are aware of this.
We moved our phplist to a cluster mysql instance.
We added primary key to phplist_i18n
and phplist_linktrack_userclick
. phplist_user_blacklist
and phplist_user_blacklist_data
tables didn't need any change.
So far it's been running OK in prod for the last 10 days, but we have low traffic phplist install.
We are migrating to MySQL cluster and one of the requirements is that every table has a primary key so deletes work across the cluster.
I noticed a few tables don't have primary keys:
My SQL knowledge is poor to honest, but here is my go at the issue:
linktrack_userclick
. I only found one query (https://github.com/phpList/phplist3/blob/main/public_html/lists/admin/convertstats.php#L105) and it uses select fields so it should be OK to add id field to the table and not break anything.email
field inuser_blacklist
anduser_blacklist_data
as primary key since it's only unique field and not nullIs there any chance primary keys could be added so that phplist is compatible with cluster version.