Paladox has uploaded a new change for review.
https://gerrit.wikimedia.org/r/320087
Change subject: Add new modifyTable function to DatabaseUpdater
......................................................................
Add new modifyTable function to DatabaseUpdater
Reason is because there is no function that we can use to add public keys
on existing tables without dropping the table and recreating it.
For example this would be really good for
I85ab18bfa30e562e76253e3ef71653dbf46db041
Change-Id: Ief8e0290f537ae00ec892b0c90d9656c50bd8788
---
M includes/installer/DatabaseUpdater.php
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/87/320087/1
diff --git a/includes/installer/DatabaseUpdater.php
b/includes/installer/DatabaseUpdater.php
index 6a702e9..91318d2 100644
--- a/includes/installer/DatabaseUpdater.php
+++ b/includes/installer/DatabaseUpdater.php
@@ -737,6 +737,22 @@
}
/**
+ * Modify table on the database
+ *
+ * @param string $name Name of the table
+ * @param string $patch Path to the patch file
+ * @param bool $fullpath Whether to treat $patch path as a relative or
not
+ * @return bool False if this was skipped because schema changes are
skipped
+ */
+ protected function modifyTable( $name, $patch, $fullpath = false ) {
+ if ( $this->db->tableExists( $name, __METHOD__ ) ) {
+ return $this->applyPatch( $patch, $fullpath, "Modifying
$name table" );
+ }
+
+ return true;
+ }
+
+ /**
* Add a new field to an existing table
*
* @param string $table Name of the table to modify
--
To view, visit https://gerrit.wikimedia.org/r/320087
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief8e0290f537ae00ec892b0c90d9656c50bd8788
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits