]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Confirm_address.php
utf8mb4 conversion on database with index adjusts
[quix0rs-gnu-social.git] / classes / Confirm_address.php
index 0ed7796ad40b8458de85c6538d166ad4ee38b13d..91a84feb77218f324ac39eaa8535ad1a0f58a5f0 100644 (file)
@@ -12,8 +12,8 @@ class Confirm_address extends Managed_DataObject
     public $__table = 'confirm_address';                 // table name
     public $code;                            // varchar(32)  primary_key not_null
     public $user_id;                         // int(4)   not_null
-    public $address;                         // varchar(255)   not_null
-    public $address_extra;                   // varchar(255)   not_null
+    public $address;                         // varchar(191)   not_null   not 255 because utf8mb4 takes more space
+    public $address_extra;                   // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $address_type;                    // varchar(8)   not_null
     public $claimed;                         // datetime()  
     public $sent;                            // datetime()  
@@ -28,8 +28,8 @@ class Confirm_address extends Managed_DataObject
             'fields' => array(
                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who requested confirmation'),
-                'address' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'),
-                'address_extra' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'carrier ID, for SMS'),
+                'address' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'),
+                'address_extra' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'carrier ID, for SMS'),
                 'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'),
                 'claimed' => array('type' => 'datetime', 'description' => 'date this was claimed for queueing'),
                 'sent' => array('type' => 'datetime', 'description' => 'date this was sent for queueing'),