Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation: improve "Re-use existing tables" #2046

Closed
robocoder opened this issue Jan 26, 2011 · 2 comments
Closed

Installation: improve "Re-use existing tables" #2046

robocoder opened this issue Jan 26, 2011 · 2 comments
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@robocoder
Copy link
Contributor

The "condition" to display the "Re-use existing tables" depends on a hard-coded number of expected core tables. This leads to a number of use cases and problems:

  1. user overwrites installation with a newer Piwik version that has added more core tables
    • if the user chooses to re-use, Piwik doesn't create the missing tables
    • if we don't increment this number, the user may be presented with an option that won't work
    • if the site table wasn't previously created (e.g., previously failed installation), user gets
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'idsite' in 'field list'
  1. dev installs Piwik and tries to run the unit tests without first configuring the ![database_tests] section
    • tables defined in ![database] section may be unexpectedly deleted
@robocoder
Copy link
Contributor Author

On second thought, creating the missing tables isn't really adviseable as there may have been other schema changes (between the current db version and the installed version of the software). Exercise caution when advising people to delete config.ini.php, and re-run the installer to regenerate config.ini.php.

@robocoder
Copy link
Contributor Author

(In [3811]) fixes #2046 - increase base table count; fix spurious table deletion

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

1 participant