enterprisemediawiki / Wiretap

User pageview tracking for MediaWiki
4 stars 6 forks source link

Fix Index Conflict #21

Open freephile opened 5 years ago

freephile commented 5 years ago

When upgrading Wiretap, you will get an error when it tries to create the unique indices that already exist. So, we delete the indices prior to creating them in the SQL files.

jamesmontalvo3 commented 5 years ago

update.php shouldn't run those patch files if the components they add already exist. For example, in [1] patch-2-page-counter.sql is only run if wiretap_counter_period table doesn't already exist. If for some reason it's trying to run these SQL files then something else is up.

[1] https://github.com/enterprisemediawiki/Wiretap/blob/098e3447a001940d1f46d062f335f58ada8d4cd2/Wiretap.body.php#L119-L135

jamesmontalvo3 commented 5 years ago

@freephile did you figure out why this was running when it shouldn't have?

freephile commented 5 years ago

I didn't figure it out.

I still get that behavior sometimes. I'll keep digging.

Greg Rundlett https://eQuality-Tech.com https://freephile.org

On Sat, Mar 23, 2019 at 10:51 AM James Montalvo notifications@github.com wrote:

@freephile https://github.com/freephile did you figure out why this was running when it shouldn't have?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enterprisemediawiki/Wiretap/pull/21#issuecomment-475876064, or mute the thread https://github.com/notifications/unsubscribe-auth/AACV4NjK07e1OnRV8d8piDHVkh9agS5qks5vZj9tgaJpZM4Z1WbD .