Skip to content

Installation: when upgrading from 2.0.3 and reusing existing tables during install, sql errorΒ #4631

@mattab

Description

@mattab

This ticket goal is to fix the installer in the use case of reinstalling over the same DB and reusing Piwik tables, as to not lose any data.

Use case:

  • Currently running Piwik 2.0.3
  • Delete config file
  • Upload latest Piwik 2.0.4
  • Go through install and set the same DB as before.
  • Click "Reuse existing tables"
  • Next step create a super user. Click the button, and we get the error:
    There was an error when adding the Super User:
  • SQLSTATE[42S22]: Column not found: 1054 Unknown column 'superuser_access' in 'field list'

The reason is that the DB is still in version 2.0.3 and so the new column added in 2.0.4-b3 is not yet in the DB.

Solution:

As soon as "reuse tables" during the installation, we should run the Updater process (in the background), and report any error that may have occured during the update, as part of the installation process. If it was successful, maybe we write the message "The database was successfully updated from 2.0 to 2.0.4!"

Maybe in this case we could rename step 5 from "Creating the Tables" to "Reusing the Tables".

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions