Migration: Difference between two database that should be at the same version

Hello,

I started a migration of a website’s data into another Matomo installation. The source Piwik/Matomo started quite a while ago and the target Matomo has been installed this day. Yet, both are running Matomo 3.11.0. Source is using the table prefix “piwik_”, target is using “matomo_”.

On the first dry-run I get:

Are you sure you want to migrate the data for idSite 59. (y/N)y
The following columns are missing in the target DB table "matomo_site": custom_css, custom_css_file
The following columns are missing in the target DB table "matomo_log_visit": location_provider
The following columns are missing in the source DB table "piwik_log_link_visit_action": idaction_content_interaction, idaction_content_name, idaction_content_piece, idaction_content_target
The following columns are missing in the target DB table "matomo_log_conversion": referer_visit_server_date

I guess the source DB has some old fields as the new DB doesn’t have those. How can I make sure if it’s save to delete fields from the source DB?

Hi,

I think location_provider is by the Provider plugin, custom_css, custom_css_file are from the customOptOut plugin and referer_visit_server_date seems to be unused for quite some while, (Delete unused column `log_conversion.referer_visit_server_date` · Issue #5927 · matomo-org/matomo · GitHub). For the idaction_ columns I have no idea. (Maybe @thomas_matomo knows more)

So if you want your target Matomo to also have the provider and css columns, you need to install the corresponding plugins.

The idaction columns are from content tracking.

1 Like

Thank you both! =)

  • Enabled plugin “Contents” on the source server
  • Installed plugin “CustomOptOut” on the target server (and added missing fields in the source database:
ALTER TABLE piwik_site ADD COLUMN custom_js TEXT NULL, ADD COLUMN custom_js_file VARCHAR(255) DEFAULT NULL;
  • Enabled plugin “Provider” on the target server
  • Deleted “piwik_log_conversion.referer_visit_server_date” from the source database

Hello, I have a similar issue plus this one:

The following columns are missing in the source DB table “piwik_goal”: description

What would be the best way to handle it? Delete the “description” column in the target database?

Any news on this one? I don’t think that having different schema in a supposedly same version is something that should happen. After all, isn’t the upgrade database procedure responsible to keep the schema the same?