Skip to content

Fix Index Conflict#21

Open
freephile wants to merge 1 commit intoenterprisemediawiki:masterfrom
freephile:fixIndexConflict
Open

Fix Index Conflict#21
freephile wants to merge 1 commit intoenterprisemediawiki:masterfrom
freephile:fixIndexConflict

Conversation

@freephile
Copy link
Contributor

@freephile freephile commented Jan 8, 2019

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.

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

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]

Wiretap/Wiretap.body.php

Lines 119 to 135 in 098e344

$updater->addExtensionTable(
$wiretapTable,
"$schemaDir/Wiretap.sql"
);
$updater->addExtensionField(
$wiretapTable,
'response_time',
"$schemaDir/patch-1-response-time.sql"
);
$updater->addExtensionTable(
$wiretapCounterTable,
"$schemaDir/patch-2-page-counter.sql"
);
$updater->addExtensionTable(
$wiretapLegacyTable,
"$schemaDir/patch-3-legacy-counter.sql"
);

@jamesmontalvo3
Copy link
Contributor

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

@freephile
Copy link
Contributor Author

freephile commented Mar 23, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants