[MediaWiki-commits] [Gerrit] mediawiki/core[master]: DatabaseUpdater: Add modifyExtensionTable()

2017-11-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391152 )

Change subject: DatabaseUpdater: Add modifyExtensionTable()
..


DatabaseUpdater: Add modifyExtensionTable()

We already had modifyExtensionField(), but to do a table modification
you still had to do
$updater->addExtensionUpdate( [ 'modifyTable', ... ] );

Change-Id: I20368bf3c007a01718513a435de24907dc0aaf81
---
M includes/installer/DatabaseUpdater.php
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/includes/installer/DatabaseUpdater.php 
b/includes/installer/DatabaseUpdater.php
index a317822..54ff712 100644
--- a/includes/installer/DatabaseUpdater.php
+++ b/includes/installer/DatabaseUpdater.php
@@ -340,13 +340,23 @@
 *
 * @param string $tableName The table name
 * @param string $fieldName The field to be modified
-* @param string $sqlPath The path to the SQL change path
+* @param string $sqlPath The path to the SQL patch
 */
public function modifyExtensionField( $tableName, $fieldName, $sqlPath 
) {
$this->extensionUpdates[] = [ 'modifyField', $tableName, 
$fieldName, $sqlPath, true ];
}
 
/**
+* @since 1.31
+*
+* @param string $tableName The table name
+* @param string $sqlPath The path to the SQL patch
+*/
+   public function modifyExtensionTable( $tableName, $sqlPath ) {
+   $this->extensionUpdates[] = [ 'modifyTable', $tableName, 
$sqlPath, true ];
+   }
+
+   /**
 *
 * @since 1.20
 *

-- 
To view, visit https://gerrit.wikimedia.org/r/391152
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I20368bf3c007a01718513a435de24907dc0aaf81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: DatabaseUpdater: Add modifyExtensionTable()

2017-11-13 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/391152 )

Change subject: DatabaseUpdater: Add modifyExtensionTable()
..

DatabaseUpdater: Add modifyExtensionTable()

We already had modifyExtensionField(), but to do a table modification
you still had to do
$updater->addExtensionUpdate( [ 'modifyTable', ... ] );

Change-Id: I20368bf3c007a01718513a435de24907dc0aaf81
---
M includes/installer/DatabaseUpdater.php
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/391152/1

diff --git a/includes/installer/DatabaseUpdater.php 
b/includes/installer/DatabaseUpdater.php
index a317822..54ff712 100644
--- a/includes/installer/DatabaseUpdater.php
+++ b/includes/installer/DatabaseUpdater.php
@@ -340,13 +340,23 @@
 *
 * @param string $tableName The table name
 * @param string $fieldName The field to be modified
-* @param string $sqlPath The path to the SQL change path
+* @param string $sqlPath The path to the SQL patch
 */
public function modifyExtensionField( $tableName, $fieldName, $sqlPath 
) {
$this->extensionUpdates[] = [ 'modifyField', $tableName, 
$fieldName, $sqlPath, true ];
}
 
/**
+* @since 1.31
+*
+* @param string $tableName The table name
+* @param string $sqlPath The path to the SQL patch
+*/
+   public function modifyExtensionTable( $tableName, $sqlPath ) {
+   $this->extensionUpdates[] = [ 'modifyTable', $tableName, 
$sqlPath, true ];
+   }
+
+   /**
 *
 * @since 1.20
 *

-- 
To view, visit https://gerrit.wikimedia.org/r/391152
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20368bf3c007a01718513a435de24907dc0aaf81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits