jenkins-bot has submitted this change and it was merged.
Change subject: Drop wbc_entity_usage.eu_touched
......................................................................
Drop wbc_entity_usage.eu_touched
No longer needed after T125838 has been implemented and
usage tracking without eu_touched proved to work out.
Manually tested with MySQL.
Bug: T132628
Change-Id: I765924489838a36ffa869e0227e120e65def78b4
---
M client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
D client/sql/entity_usage-add-touched.sql
A client/sql/entity_usage-drop-touched.sql
M client/sql/entity_usage.sql
M docs/usagetracking.wiki
5 files changed, 8 insertions(+), 9 deletions(-)
Approvals:
Jcrespo: Looks good to me, but someone else must approve
Daniel Kinzler: Looks good to me, approved
Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
b/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
index 02ab3e1..26cf796 100644
--- a/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
+++ b/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdater.php
@@ -65,11 +65,11 @@
$this->dbUpdater->modifyExtensionField( $table,
'eu_aspect', $script );
}
- $script = $this->getUpdateScriptPath(
'entity_usage-add-touched', $db->getType() );
- $this->dbUpdater->addExtensionField( $table,
'eu_touched', $script );
-
$script = $this->getUpdateScriptPath(
'entity_usage-drop-entity_type', $db->getType() );
$this->dbUpdater->dropExtensionField( $table,
'eu_entity_type', $script );
+
+ $script = $this->getUpdateScriptPath(
'entity_usage-drop-touched', $db->getType() );
+ $this->dbUpdater->dropExtensionField( $table,
'eu_touched', $script );
}
}
diff --git a/client/sql/entity_usage-add-touched.sql
b/client/sql/entity_usage-add-touched.sql
deleted file mode 100644
index bb6106f..0000000
--- a/client/sql/entity_usage-add-touched.sql
+++ /dev/null
@@ -1,3 +0,0 @@
--- Add a column for tracking page.page_touched, to detect outdated entries in
wbc_entity_usage.
-ALTER TABLE /*_*/wbc_entity_usage
- ADD COLUMN eu_touched BINARY(14) NOT NULL DEFAULT '';
diff --git a/client/sql/entity_usage-drop-touched.sql
b/client/sql/entity_usage-drop-touched.sql
new file mode 100644
index 0000000..58b485d
--- /dev/null
+++ b/client/sql/entity_usage-drop-touched.sql
@@ -0,0 +1,4 @@
+-- get rid of the eu_touched column
+
+ALTER TABLE /*_*/wbc_entity_usage
+ DROP COLUMN eu_touched;
diff --git a/client/sql/entity_usage.sql b/client/sql/entity_usage.sql
index 4d93943..62140f5 100644
--- a/client/sql/entity_usage.sql
+++ b/client/sql/entity_usage.sql
@@ -2,8 +2,7 @@
eu_row_id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
eu_entity_id VARBINARY(255) NOT NULL, -- the ID of the entity being used
eu_aspect VARBINARY(37) NOT NULL, -- the aspect of the entity. See
EntityUsage::XXX_USAGE for possible values.
- eu_page_id INT NOT NULL, -- the ID of the page that uses
the entities.
- eu_touched BINARY(14) NOT NULL DEFAULT '' -- timestamp corresponding
to page.page_touched
+ eu_page_id INT NOT NULL -- the ID of the page that uses
the entities.
) /*$wgDBTableOptions*/;
-- record one usage per page per aspect of an entity
diff --git a/docs/usagetracking.wiki b/docs/usagetracking.wiki
index c3d9e0e..d32b0d6 100644
--- a/docs/usagetracking.wiki
+++ b/docs/usagetracking.wiki
@@ -38,7 +38,6 @@
eu_entity_id VARBINARY(255) NOT NULL -- the ID of the entity being used
eu_aspect VARBINARY(37) NOT NULL -- the aspect of the entity. See
EntityUsage::XXX_USAGE for possible values.
eu_page_id INT NOT NULL -- the ID of the page that uses
the entities.
- eu_touched BINARY(14) NOT NULL DEFAULT '' -- timestamp corresponding
to page.page_touched (currently unused)
The following indexes are provided for efficient access:
--
To view, visit https://gerrit.wikimedia.org/r/304136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I765924489838a36ffa869e0227e120e65def78b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits