@tsteur opened this Pull Request on September 11th 2019 Member

This can avoid some error logs depending on the used database adapter etc. In theory we can then remove catching the error a few lines below but should be fine to keep it as well.

If not exists should be safe to use, was even supported in old versions: http://ftp.nchu.edu.tw/MySQL/doc/refman/4.1/en/create-table.html

Not sure why it wasn't used right away. A comment in the code refers to https://github.com/piwik/piwik/issues/153 but looks like that ID wasn't 100% correctly migrated from the old trac. In any way, using if not exists should be fine...

This Pull Request was closed on September 11th 2019
Powered by GitHub Issue Mirror