Ejegg has submitted this change and it was merged.

Change subject: Extend the fredge payment_submethod column to 32 chars
......................................................................


Extend the fredge payment_submethod column to 32 chars

Needed for AstroPay.  This is a no-op on production, where the column is already
32 chars long, but updating the Drupal schema allows us to validate data length
correctly.

Change-Id: I398424ad6e907d5b5bb681d77f2bb3799f6ce364
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.install
1 file changed, 17 insertions(+), 1 deletion(-)

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.install 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.install
index 4858784..8da1c43 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.install
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.install
@@ -3,6 +3,7 @@
 function wmf_fredge_qc_install() {
   wmf_fredge_qc_update_7001();
   wmf_fredge_qc_update_7002();
+  wmf_fredge_qc_update_7003();
 }
 
 /**
@@ -38,6 +39,21 @@
   } catch (PDOException $ex) {
     drupal_set_message("Index already exists?: " + $ex->getMessage());
   }
+}
+
+/**
+ * Extend payment_submethod field to 32 characters.
+ */
+function wmf_fredge_qc_update_7003() {
+  $dbs = wmf_civicrm_get_dbs();
+  $dbs->push('fredge');
+
+  db_change_field('payments_initial', 'payment_submethod', 'payment_submethod',
+    array('type' => 'varchar',
+          'length' => 32,
+          'not null' => false,
+    )
+  );
 }
 
 /**
@@ -104,7 +120,7 @@
         ),
         'payment_submethod' => array(
           'type' => 'varchar',
-          'length' => 16,
+          'length' => 32,
           'not null' => false,
         ),
         'country' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I398424ad6e907d5b5bb681d77f2bb3799f6ce364
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Pcoombe <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to