@bx80 opened this Issue on August 19th 2022 Contributor

Several unique identifiers in the Matomo UI are based on auto incrementing database primary keys, such as the site id or goal id.

When using an alternative database which uses random or UUID primary keys these values will become long, random and unfriendly to use. In order to support databases with primary key types other than auto increment these identifiers should be migrated to sequences rather than primary keys.

Suggested Approach

  • Identify all incremental primary keys which are shown in the Matomo UI.
  • Disable auto_increment for the identified primary keys.
  • For each key, rework new record insertion to generate the primary key using the sequence table and then specify it explicitly on insert.

Keys that are shown in the UI
idSite, idCustomDimension, idCustomReport, idGoal, idForm, the keys for most sub-categories under Administration > Measurables.
There may be others.

Powered by GitHub Issue Mirror