]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
utf8mb4 conversion on database with index adjusts
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 12 Feb 2015 17:18:55 +0000 (18:18 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 12 Feb 2015 17:18:55 +0000 (18:18 +0100)
68 files changed:
classes/Attention.php
classes/Avatar.php
classes/Config.php
classes/Confirm_address.php
classes/Consumer.php
classes/Conversation.php
classes/Deleted_notice.php
classes/File.php
classes/File_redirection.php
classes/File_thumbnail.php
classes/Foreign_link.php
classes/Foreign_service.php
classes/Foreign_user.php
classes/Group_member.php
classes/Invitation.php
classes/Location_namespace.php
classes/Memcached_DataObject.php
classes/Nonce.php
classes/Notice.php
classes/Notice_source.php
classes/Oauth_application.php
classes/Oauth_application_user.php
classes/Oauth_token_association.php
classes/Profile.php
classes/Profile_list.php
classes/Profile_prefs.php
classes/Sms_carrier.php
classes/Status_network.php
classes/Subscription.php
classes/Token.php
classes/User.php
classes/User_group.php
classes/User_im_prefs.php
classes/User_username.php
db/site.sql
extlib/DB.php
lib/event.php
lib/mysqlschema.php
plugins/Blacklist/classes/Homepage_blacklist.php
plugins/Blacklist/classes/Nickname_blacklist.php
plugins/Blog/classes/Blog_entry.php
plugins/Bookmark/classes/Bookmark.php
plugins/DirectMessage/classes/Message.php
plugins/EmailReminder/classes/Email_reminder.php
plugins/Event/classes/Happening.php
plugins/Event/classes/RSVP.php
plugins/FacebookBridge/classes/Notice_to_item.php
plugins/Favorite/classes/Fave.php
plugins/GNUsocialPhoto/classes/Photo.php
plugins/GNUsocialPhotos/classes/gnusocialphoto.php
plugins/GNUsocialPhotos/classes/gnusocialphotoalbum.php
plugins/GNUsocialProfileExtensions/classes/GNUsocialProfileExtensionField.php
plugins/GNUsocialVideo/classes/Video.php
plugins/GroupPrivateMessage/classes/Group_message.php
plugins/NoticeTitle/classes/Notice_title.php
plugins/OStatus/classes/FeedSub.php
plugins/OStatus/classes/HubSub.php
plugins/OStatus/classes/Ostatus_profile.php
plugins/OStatus/classes/Ostatus_source.php
plugins/Oembed/classes/File_oembed.php
plugins/OpenID/classes/User_openid.php
plugins/OpenID/classes/User_openid_trustroot.php
plugins/Poll/classes/Poll.php
plugins/Poll/classes/Poll_response.php
plugins/QnA/classes/QnA_Answer.php
plugins/QnA/classes/QnA_Question.php
plugins/Realtime/classes/Realtime_channel.php
plugins/TwitterBridge/classes/Twitter_synch_status.php

index ef0dcb1df7dd4dc56798f087bafdcb48374506da..c15a118e122f7a6f397b2323a8684c4094f20f14 100644 (file)
@@ -22,7 +22,7 @@ class Attention extends Managed_DataObject
     public $__table = 'attention';  // table name
     public $notice_id;              // int(4) primary_key not_null
     public $profile_id;             // int(4) primary_key not_null
     public $__table = 'attention';  // table name
     public $notice_id;              // int(4) primary_key not_null
     public $profile_id;             // int(4) primary_key not_null
-    public $reason;                 // varchar(255)
+    public $reason;                 // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                // datetime()   not_null
     public $modified;               // timestamp   not_null default_CURRENT_TIMESTAMP
 
     public $created;                // datetime()   not_null
     public $modified;               // timestamp   not_null default_CURRENT_TIMESTAMP
 
@@ -33,7 +33,7 @@ class Attention extends Managed_DataObject
             'fields' => array(
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice_id to give attention'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'profile_id for feed receiver'),
             'fields' => array(
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice_id to give attention'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'profile_id for feed receiver'),
-                'reason' => array('type' => 'varchar', 'length' => 255, 'description' => 'Optional reason why this was brought to the attention of profile_id'),
+                'reason' => array('type' => 'varchar', 'length' => 191, 'description' => 'Optional reason why this was brought to the attention of profile_id'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 55abc81b33b3850891b6c3ca6ca80ceddd3efdfd..3b3317b3ef5ed9f58e066a6e95f43aac9392f696 100644 (file)
@@ -15,8 +15,8 @@ class Avatar extends Managed_DataObject
     public $width;                           // int(4)  primary_key not_null
     public $height;                          // int(4)  primary_key not_null
     public $mediatype;                       // varchar(32)   not_null
     public $width;                           // int(4)  primary_key not_null
     public $height;                          // int(4)  primary_key not_null
     public $mediatype;                       // varchar(32)   not_null
-    public $filename;                        // varchar(255)
-    public $url;                             // varchar(255)  unique_key
+    public $filename;                        // varchar(191)   not 255 because utf8mb4 takes more space
+    public $url;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -32,8 +32,8 @@ class Avatar extends Managed_DataObject
                 'width' => array('type' => 'int', 'not null' => true, 'description' => 'image width'),
                 'height' => array('type' => 'int', 'not null' => true, 'description' => 'image height'),
                 'mediatype' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'file type'),
                 'width' => array('type' => 'int', 'not null' => true, 'description' => 'image width'),
                 'height' => array('type' => 'int', 'not null' => true, 'description' => 'image height'),
                 'mediatype' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'file type'),
-                'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'local filename, if local'),
-                'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'avatar location'),
+                'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'local filename, if local'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'avatar location'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 899396d710e13823270698903eaf5dcdfc422ea5..2e8492849c4b9f68abb1586aad52f9406e9c81f2 100644 (file)
@@ -35,7 +35,7 @@ class Config extends Managed_DataObject
     public $__table = 'config';                          // table name
     public $section;                         // varchar(32)  primary_key not_null
     public $setting;                         // varchar(32)  primary_key not_null
     public $__table = 'config';                          // table name
     public $section;                         // varchar(32)  primary_key not_null
     public $setting;                         // varchar(32)  primary_key not_null
-    public $value;                           // varchar(255)
+    public $value;                           // varchar(191)   not 255 because utf8mb4 takes more space
 
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
@@ -46,7 +46,7 @@ class Config extends Managed_DataObject
             'fields' => array(
                 'section' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration section'),
                 'setting' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration setting'),
             'fields' => array(
                 'section' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration section'),
                 'setting' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration setting'),
-                'value' => array('type' => 'varchar', 'length' => 255, 'description' => 'configuration value'),
+                'value' => array('type' => 'varchar', 'length' => 191, 'description' => 'configuration value'),
             ),
             'primary key' => array('section', 'setting'),
         );
             ),
             'primary key' => array('section', 'setting'),
         );
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 $__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()  
     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'),
             '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'),
                 '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'),
index 68e973bfb095bcfe55180c539026856b04c1f087..4121938ed864fd090ab25164980267492a8d737c 100644 (file)
@@ -10,8 +10,8 @@ class Consumer extends Managed_DataObject
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'consumer';                        // table name
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'consumer';                        // table name
-    public $consumer_key;                    // varchar(255)  primary_key not_null
-    public $consumer_secret;                 // varchar(255)   not_null
+    public $consumer_key;                    // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
+    public $consumer_secret;                 // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $seed;                            // char(32)   not_null
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $seed;                            // char(32)   not_null
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
@@ -24,8 +24,8 @@ class Consumer extends Managed_DataObject
         return array(
             'description' => 'OAuth consumer record',
             'fields' => array(
         return array(
             'description' => 'OAuth consumer record',
             'fields' => array(
-                'consumer_key' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'unique identifier, root URL'),
-                'consumer_secret' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'secret value'),
+                'consumer_key' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'unique identifier, root URL'),
+                'consumer_secret' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'secret value'),
                 'seed' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'seed for new tokens by this consumer'),
 
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'seed' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'seed for new tokens by this consumer'),
 
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
index 56f61c63ab2c1453ebd8250c6c17b721bd358bcc..343668cc49d95e6632488c77f87668ed690aaecf 100644 (file)
@@ -35,7 +35,7 @@ class Conversation extends Managed_DataObject
 {
     public $__table = 'conversation';        // table name
     public $id;                              // int(4)  primary_key not_null
 {
     public $__table = 'conversation';        // table name
     public $id;                              // int(4)  primary_key not_null
-    public $uri;                             // varchar(255)  unique_key
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
@@ -44,7 +44,7 @@ class Conversation extends Managed_DataObject
         return array(
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'should be set from root notice id (since 2014-03-01 commit)'),
         return array(
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'should be set from root notice id (since 2014-03-01 commit)'),
-                'uri' => array('type' => 'varchar', 'not null'=>true, 'length' => 255, 'description' => 'URI of the conversation'),
+                'uri' => array('type' => 'varchar', 'not null'=>true, 'length' => 191, 'description' => 'URI of the conversation'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 4c17be185a0ff438fe34004dc0fb28d0c7d9f9cd..a9167f19a48ee2c5069123567562dfcc13d1e70f 100644 (file)
@@ -34,7 +34,7 @@ class Deleted_notice extends Managed_DataObject
     public $__table = 'deleted_notice';                  // table name
     public $id;                              // int(4)  primary_key not_null
     public $profile_id;                      // int(4)   not_null
     public $__table = 'deleted_notice';                  // table name
     public $id;                              // int(4)  primary_key not_null
     public $profile_id;                      // int(4)   not_null
-    public $uri;                             // varchar(255)  unique_key
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $deleted;                         // datetime()   not_null
 
     public $created;                         // datetime()   not_null
     public $deleted;                         // datetime()   not_null
 
@@ -47,7 +47,7 @@ class Deleted_notice extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity of notice'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'author of the notice'),
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity of notice'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'author of the notice'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier, usually a tag URI'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier, usually a tag URI'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
                 'deleted' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
                 'deleted' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
             ),
index ce2f9401618286bcfd9485f8f3682add5c8df0f2..b42e1a674fb012d642438ccdf96b4a7f71d8aca2 100644 (file)
@@ -26,13 +26,13 @@ class File extends Managed_DataObject
 {
     public $__table = 'file';                            // table name
     public $id;                              // int(4)  primary_key not_null
 {
     public $__table = 'file';                            // table name
     public $id;                              // int(4)  primary_key not_null
-    public $url;                             // varchar(255)  unique_key
+    public $url;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $mimetype;                        // varchar(50)
     public $size;                            // int(4)
     public $mimetype;                        // varchar(50)
     public $size;                            // int(4)
-    public $title;                           // varchar(255)
+    public $title;                           // varchar(191)   not 255 because utf8mb4 takes more space
     public $date;                            // int(4)
     public $protected;                       // int(4)
     public $date;                            // int(4)
     public $protected;                       // int(4)
-    public $filename;                        // varchar(255)
+    public $filename;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $width;                           // int(4)
     public $height;                          // int(4)
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $width;                           // int(4)
     public $height;                          // int(4)
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -42,13 +42,13 @@ class File extends Managed_DataObject
         return array(
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true),
         return array(
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true),
-                'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'destination URL after following redirections'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'destination URL after following redirections'),
                 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
                 'size' => array('type' => 'int', 'description' => 'size of resource when available'),
                 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
                 'size' => array('type' => 'int', 'description' => 'size of resource when available'),
-                'title' => array('type' => 'varchar', 'length' => 255, 'description' => 'title of resource when available'),
+                'title' => array('type' => 'varchar', 'length' => 191, 'description' => 'title of resource when available'),
                 'date' => array('type' => 'int', 'description' => 'date of resource according to http query'),
                 'protected' => array('type' => 'int', 'description' => 'true when URL is private (needs login)'),
                 'date' => array('type' => 'int', 'description' => 'date of resource according to http query'),
                 'protected' => array('type' => 'int', 'description' => 'true when URL is private (needs login)'),
-                'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'if a local file, name of the file'),
+                'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'if a local file, name of the file'),
                 'width' => array('type' => 'int', 'description' => 'width in pixels, if it can be described as such and data is available'),
                 'height' => array('type' => 'int', 'description' => 'height in pixels, if it can be described as such and data is available'),
 
                 'width' => array('type' => 'int', 'description' => 'width in pixels, if it can be described as such and data is available'),
                 'height' => array('type' => 'int', 'description' => 'height in pixels, if it can be described as such and data is available'),
 
@@ -152,7 +152,7 @@ class File extends Managed_DataObject
                 }
 
                 // TODO: max field length
                 }
 
                 // TODO: max field length
-                if ($redir_url === $given_url || strlen($redir_url) > 255 || !$followRedirects) {
+                if ($redir_url === $given_url || strlen($redir_url) > 191 || !$followRedirects) {
                     // Save the File object based on our lookup trace
                     $file = File::saveNew($redir_data, $given_url);
                 } else {
                     // Save the File object based on our lookup trace
                     $file = File::saveNew($redir_data, $given_url);
                 } else {
index 0bcccc6cffbbb52ecd8aa4b0100e2afe6cd93dda..d78dc66385d96236e9a14711a8dadecb16153c44 100644 (file)
@@ -29,7 +29,7 @@ class File_redirection extends Managed_DataObject
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'file_redirection';                // table name
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'file_redirection';                // table name
-    public $url;                             // varchar(255)  primary_key not_null
+    public $url;                             // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
     public $file_id;                         // int(4)
     public $redirections;                    // int(4)
     public $httpcode;                        // int(4)
     public $file_id;                         // int(4)
     public $redirections;                    // int(4)
     public $httpcode;                        // int(4)
@@ -42,7 +42,7 @@ class File_redirection extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'url' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'short URL (or any other kind of redirect) for file (id)'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'short URL (or any other kind of redirect) for file (id)'),
                 'file_id' => array('type' => 'int', 'description' => 'short URL for what URL/file'),
                 'redirections' => array('type' => 'int', 'description' => 'redirect count'),
                 'httpcode' => array('type' => 'int', 'description' => 'HTTP status code (20x, 30x, etc.)'),
                 'file_id' => array('type' => 'int', 'description' => 'short URL for what URL/file'),
                 'redirections' => array('type' => 'int', 'description' => 'redirect count'),
                 'httpcode' => array('type' => 'int', 'description' => 'HTTP status code (20x, 30x, etc.)'),
index 6a92b07d0cda40bfde4e3e9c7a128cc91551e4f4..af3551028e804182f8abacd230d73e3da465018e 100644 (file)
@@ -27,8 +27,8 @@ class File_thumbnail extends Managed_DataObject
 {
     public $__table = 'file_thumbnail';                  // table name
     public $file_id;                         // int(4)  primary_key not_null
 {
     public $__table = 'file_thumbnail';                  // table name
     public $file_id;                         // int(4)  primary_key not_null
-    public $url;                             // varchar(255)  unique_key
-    public $filename;                        // varchar(255)
+    public $url;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
+    public $filename;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $width;                           // int(4)  primary_key
     public $height;                          // int(4)  primary_key
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $width;                           // int(4)  primary_key
     public $height;                          // int(4)  primary_key
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -38,8 +38,8 @@ class File_thumbnail extends Managed_DataObject
         return array(
             'fields' => array(
                 'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'thumbnail for what URL/file'),
         return array(
             'fields' => array(
                 'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'thumbnail for what URL/file'),
-                'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL of thumbnail'),
-                'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'if stored locally, filename is put here'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL of thumbnail'),
+                'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'if stored locally, filename is put here'),
                 'width' => array('type' => 'int', 'description' => 'width of thumbnail'),
                 'height' => array('type' => 'int', 'description' => 'height of thumbnail'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'width' => array('type' => 'int', 'description' => 'width of thumbnail'),
                 'height' => array('type' => 'int', 'description' => 'height of thumbnail'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index a964d87fdd9baa19e2a1fd024a74f9d3c5745c6c..6176ec43bc3f3a1bf568ce4effb3e66726697219 100644 (file)
@@ -13,7 +13,7 @@ class Foreign_link extends Managed_DataObject
     public $user_id;                         // int(4)  primary_key not_null
     public $foreign_id;                      // bigint(8)  primary_key not_null unsigned
     public $service;                         // int(4)  primary_key not_null
     public $user_id;                         // int(4)  primary_key not_null
     public $foreign_id;                      // bigint(8)  primary_key not_null unsigned
     public $service;                         // int(4)  primary_key not_null
-    public $credentials;                     // varchar(255)
+    public $credentials;                     // varchar(191)   not 255 because utf8mb4 takes more space
     public $noticesync;                      // tinyint(1)   not_null default_1
     public $friendsync;                      // tinyint(1)   not_null default_2
     public $profilesync;                     // tinyint(1)   not_null default_1
     public $noticesync;                      // tinyint(1)   not_null default_1
     public $friendsync;                      // tinyint(1)   not_null default_2
     public $profilesync;                     // tinyint(1)   not_null default_1
@@ -32,7 +32,7 @@ class Foreign_link extends Managed_DataObject
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'link to user on this system, if exists'),
                 'foreign_id' => array('type' => 'int', 'size' => 'big', 'unsigned' => true, 'not null' => true, 'description' => 'link to user on foreign service, if exists'),
                 'service' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to service'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'link to user on this system, if exists'),
                 'foreign_id' => array('type' => 'int', 'size' => 'big', 'unsigned' => true, 'not null' => true, 'description' => 'link to user on foreign service, if exists'),
                 'service' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to service'),
-                'credentials' => array('type' => 'varchar', 'length' => 255, 'description' => 'authc credentials, typically a password'),
+                'credentials' => array('type' => 'varchar', 'length' => 191, 'description' => 'authc credentials, typically a password'),
                 'noticesync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'notice synchronization, bit 1 = sync outgoing, bit 2 = sync incoming, bit 3 = filter local replies'),
                 'friendsync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 2, 'description' => 'friend synchronization, bit 1 = sync outgoing, bit 2 = sync incoming'),
                 'profilesync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming'),
                 'noticesync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'notice synchronization, bit 1 = sync outgoing, bit 2 = sync incoming, bit 3 = filter local replies'),
                 'friendsync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 2, 'description' => 'friend synchronization, bit 1 = sync outgoing, bit 2 = sync incoming'),
                 'profilesync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming'),
index df9fd5825d8fd49a4a61c8aaed488f6f7a560ffc..78c1c0cee5bc68cf74022d890259362cea0c4b3a 100644 (file)
@@ -12,7 +12,7 @@ class Foreign_service extends Managed_DataObject
     public $__table = 'foreign_service';                 // table name
     public $id;                              // int(4)  primary_key not_null
     public $name;                            // varchar(32)  unique_key not_null
     public $__table = 'foreign_service';                 // table name
     public $id;                              // int(4)  primary_key not_null
     public $name;                            // varchar(32)  unique_key not_null
-    public $description;                     // varchar(255)
+    public $description;                     // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -25,7 +25,7 @@ class Foreign_service extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'numeric key for service'),
                 'name' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'name of the service'),
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'numeric key for service'),
                 'name' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'name of the service'),
-                'description' => array('type' => 'varchar', 'length' => 255, 'description' => 'description'),
+                'description' => array('type' => 'varchar', 'length' => 191, 'description' => 'description'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index eeaf817876b7ff8ead28c47cb6e82bc6cf3d621a..c1739d318a08737cedccfec1a8af17b316ee9e71 100644 (file)
@@ -12,8 +12,8 @@ class Foreign_user extends Managed_DataObject
     public $__table = 'foreign_user';                    // table name
     public $id;                              // bigint(8)  primary_key not_null
     public $service;                         // int(4)  primary_key not_null
     public $__table = 'foreign_user';                    // table name
     public $id;                              // bigint(8)  primary_key not_null
     public $service;                         // int(4)  primary_key not_null
-    public $uri;                             // varchar(255)  unique_key not_null
-    public $nickname;                        // varchar(255)
+    public $uri;                             // varchar(191)  unique_key not_null   not 255 because utf8mb4 takes more space
+    public $nickname;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -26,8 +26,8 @@ class Foreign_user extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'unique numeric key on foreign service'),
                 'service' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to service'),
             'fields' => array(
                 'id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'unique numeric key on foreign service'),
                 'service' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to service'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'identifying URI'),
-                'nickname' => array('type' => 'varchar', 'length' => 255, 'description' => 'nickname on foreign service'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'identifying URI'),
+                'nickname' => array('type' => 'varchar', 'length' => 191, 'description' => 'nickname on foreign service'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 14f417758da21890fecf21a944cdc77891c3beb8..392440222b066d6c153c2a9704acb88f4ade03a1 100644 (file)
@@ -12,7 +12,7 @@ class Group_member extends Managed_DataObject
     public $group_id;                        // int(4)  primary_key not_null
     public $profile_id;                      // int(4)  primary_key not_null
     public $is_admin;                        // tinyint(1)
     public $group_id;                        // int(4)  primary_key not_null
     public $profile_id;                      // int(4)  primary_key not_null
     public $is_admin;                        // tinyint(1)
-    public $uri;                             // varchar(255)
+    public $uri;                             // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -26,7 +26,7 @@ class Group_member extends Managed_DataObject
                 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to user_group'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
                 'is_admin' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'is this user an admin?'),
                 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to user_group'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
                 'is_admin' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'is this user an admin?'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index a40bd0f330a5b96d8afaba56f3d7743a79efc9c6..ca03bb7aa10fe4dfa868fd8ccce5dc99c046054c 100644 (file)
@@ -12,7 +12,7 @@ class Invitation extends Managed_DataObject
     public $__table = 'invitation';                      // table name
     public $code;                            // varchar(32)  primary_key not_null
     public $user_id;                         // int(4)   not_null
     public $__table = 'invitation';                      // table name
     public $code;                            // varchar(32)  primary_key not_null
     public $user_id;                         // int(4)   not_null
-    public $address;                         // varchar(255)  multiple_key not_null
+    public $address;                         // varchar(191)  multiple_key not_null   not 255 because utf8mb4 takes more space
     public $address_type;                    // varchar(8)  multiple_key not_null
     public $registered_user_id;              // int(4)   not_null
     public $created;                         // datetime()   not_null
     public $address_type;                    // varchar(8)  multiple_key not_null
     public $registered_user_id;              // int(4)   not_null
     public $created;                         // datetime()   not_null
@@ -34,7 +34,7 @@ class Invitation extends Managed_DataObject
             'fields' => array(
                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'random code for an invitation'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'who sent the invitation'),
             'fields' => array(
                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'random code for an invitation'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'who sent the invitation'),
-                'address' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'invitation sent to'),
+                'address' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'invitation sent to'),
                 'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'registered_user_id' => array('type' => 'int', 'not null' => false, 'description' => 'if the invitation is converted, who the new user is'),
                 'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'registered_user_id' => array('type' => 'int', 'not null' => false, 'description' => 'if the invitation is converted, who the new user is'),
index 3690ecc0446a7d3617c4f82d9a680cd4531ebd1b..a84147395348308ae96b5e818df92206acd1cd40 100644 (file)
@@ -32,7 +32,7 @@ class Location_namespace extends Managed_DataObject
 
     public $__table = 'location_namespace';              // table name
     public $id;                              // int(4)  primary_key not_null
 
     public $__table = 'location_namespace';              // table name
     public $id;                              // int(4)  primary_key not_null
-    public $description;                     // varchar(255)
+    public $description;                     // varchar(191)
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -44,7 +44,7 @@ class Location_namespace extends Managed_DataObject
         return array(
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity for this namespace'),
         return array(
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity for this namespace'),
-                'description' => array('type' => 'varchar', 'length' => 255, 'description' => 'description of the namespace'),
+                'description' => array('type' => 'varchar', 'length' => 191, 'description' => 'description of the namespace'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 2bd9581cf6dcf17fe4454f8244c7bc4d2942c7da..3f1945205afcb48fd0cde54beb4257ed095b2791 100644 (file)
@@ -734,7 +734,7 @@ class Memcached_DataObject extends Safe_DataObject
         return $string;
     }
 
         return $string;
     }
 
-    // We overload so that 'SET NAMES "utf8"' is called for
+    // We overload so that 'SET NAMES "utf8mb4"' is called for
     // each connection
 
     function _connect()
     // each connection
 
     function _connect()
@@ -784,9 +784,9 @@ class Memcached_DataObject extends Safe_DataObject
                 $conn = $DB->connection;
                 if (!empty($conn)) {
                     if ($DB instanceof DB_mysqli || $DB instanceof MDB2_Driver_mysqli) {
                 $conn = $DB->connection;
                 if (!empty($conn)) {
                     if ($DB instanceof DB_mysqli || $DB instanceof MDB2_Driver_mysqli) {
-                        mysqli_set_charset($conn, 'utf8');
+                        mysqli_set_charset($conn, 'utf8mb4');
                     } else if ($DB instanceof DB_mysql || $DB instanceof MDB2_Driver_mysql) {
                     } else if ($DB instanceof DB_mysql || $DB instanceof MDB2_Driver_mysql) {
-                        mysql_set_charset('utf8', $conn);
+                        mysql_set_charset('utf8mb4', $conn);
                     }
                 }
             }
                     }
                 }
             }
index 9d8dfece044b8ee740c41fefca852800e2828219..d37aade4a8f85063c045142a4670a0a00f43af4b 100644 (file)
@@ -10,7 +10,7 @@ class Nonce extends Managed_DataObject
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'nonce';                           // table name
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'nonce';                           // table name
-    public $consumer_key;                    // varchar(255)  primary_key not_null
+    public $consumer_key;                    // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
     public $tok;                             // char(32)
     public $nonce;                           // char(32)  primary_key not_null
     public $ts;                              // datetime()  primary_key not_null
     public $tok;                             // char(32)
     public $nonce;                           // char(32)  primary_key not_null
     public $ts;                              // datetime()  primary_key not_null
@@ -39,7 +39,7 @@ class Nonce extends Managed_DataObject
         return array(
             'description' => 'OAuth nonce record',
             'fields' => array(
         return array(
             'description' => 'OAuth nonce record',
             'fields' => array(
-                'consumer_key' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'unique identifier, root URL'),
+                'consumer_key' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'unique identifier, root URL'),
                 'tok' => array('type' => 'char', 'length' => 32, 'description' => 'buggy old value, ignored'),
                 'nonce' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'nonce'),
                 'ts' => array('type' => 'datetime', 'not null' => true, 'description' => 'timestamp sent'),
                 'tok' => array('type' => 'char', 'length' => 32, 'description' => 'buggy old value, ignored'),
                 'nonce' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'nonce'),
                 'ts' => array('type' => 'datetime', 'not null' => true, 'description' => 'timestamp sent'),
index a69efc45aeadae79c43fcc92d763278a6192caab..3b03069f133d7e56f9714db282ad9e887e6128bc 100644 (file)
@@ -55,10 +55,10 @@ class Notice extends Managed_DataObject
     public $__table = 'notice';                          // table name
     public $id;                              // int(4)  primary_key not_null
     public $profile_id;                      // int(4)  multiple_key not_null
     public $__table = 'notice';                          // table name
     public $id;                              // int(4)  primary_key not_null
     public $profile_id;                      // int(4)  multiple_key not_null
-    public $uri;                             // varchar(255)  unique_key
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $content;                         // text
     public $rendered;                        // text
     public $content;                         // text
     public $rendered;                        // text
-    public $url;                             // varchar(255)
+    public $url;                             // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime  multiple_key not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $reply_to;                        // int(4)
     public $created;                         // datetime  multiple_key not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $reply_to;                        // int(4)
@@ -70,8 +70,8 @@ class Notice extends Managed_DataObject
     public $location_id;                     // int(4)
     public $location_ns;                     // int(4)
     public $repeat_of;                       // int(4)
     public $location_id;                     // int(4)
     public $location_ns;                     // int(4)
     public $repeat_of;                       // int(4)
-    public $verb;                            // varchar(255)
-    public $object_type;                     // varchar(255)
+    public $verb;                            // varchar(191)   not 255 because utf8mb4 takes more space
+    public $object_type;                     // varchar(191)   not 255 because utf8mb4 takes more space
     public $scope;                           // int(4)
 
     /* the code above is auto generated do not remove the tag below */
     public $scope;                           // int(4)
 
     /* the code above is auto generated do not remove the tag below */
@@ -83,10 +83,10 @@ class Notice extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'who made the update'),
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'who made the update'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier, usually a tag URI'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier, usually a tag URI'),
                 'content' => array('type' => 'text', 'description' => 'update content', 'collate' => 'utf8_general_ci'),
                 'rendered' => array('type' => 'text', 'description' => 'HTML version of the content'),
                 'content' => array('type' => 'text', 'description' => 'update content', 'collate' => 'utf8_general_ci'),
                 'rendered' => array('type' => 'text', 'description' => 'HTML version of the content'),
-                'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL of any attachment (image, video, bookmark, whatever)'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL of any attachment (image, video, bookmark, whatever)'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'reply_to' => array('type' => 'int', 'description' => 'notice replied to (usually a guess)'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'reply_to' => array('type' => 'int', 'description' => 'notice replied to (usually a guess)'),
@@ -98,8 +98,8 @@ class Notice extends Managed_DataObject
                 'location_id' => array('type' => 'int', 'description' => 'location id if possible'),
                 'location_ns' => array('type' => 'int', 'description' => 'namespace for location'),
                 'repeat_of' => array('type' => 'int', 'description' => 'notice this is a repeat of'),
                 'location_id' => array('type' => 'int', 'description' => 'location id if possible'),
                 'location_ns' => array('type' => 'int', 'description' => 'namespace for location'),
                 'repeat_of' => array('type' => 'int', 'description' => 'notice this is a repeat of'),
-                'object_type' => array('type' => 'varchar', 'length' => 255, 'description' => 'URI representing activity streams object type', 'default' => 'http://activitystrea.ms/schema/1.0/note'),
-                'verb' => array('type' => 'varchar', 'length' => 255, 'description' => 'URI representing activity streams verb', 'default' => 'http://activitystrea.ms/schema/1.0/post'),
+                'object_type' => array('type' => 'varchar', 'length' => 191, 'description' => 'URI representing activity streams object type', 'default' => 'http://activitystrea.ms/schema/1.0/note'),
+                'verb' => array('type' => 'varchar', 'length' => 191, 'description' => 'URI representing activity streams verb', 'default' => 'http://activitystrea.ms/schema/1.0/post'),
                 'scope' => array('type' => 'int',
                                  'description' => 'bit map for distribution scope; 0 = everywhere; 1 = this server only; 2 = addressees; 4 = followers; null = default'),
             ),
                 'scope' => array('type' => 'int',
                                  'description' => 'bit map for distribution scope; 0 = everywhere; 1 = this server only; 2 = addressees; 4 = followers; null = default'),
             ),
index 6f3d2e5634d4249dc5632de95f6196b9575bac5a..f31d4411ffbd5d4f975fb8f1ecb591391b540711 100644 (file)
@@ -11,8 +11,8 @@ class Notice_source extends Managed_DataObject
 
     public $__table = 'notice_source';                   // table name
     public $code;                            // varchar(32)  primary_key not_null
 
     public $__table = 'notice_source';                   // table name
     public $code;                            // varchar(32)  primary_key not_null
-    public $name;                            // varchar(255)   not_null
-    public $url;                             // varchar(255)   not_null
+    public $name;                            // varchar(191)   not_null   not 255 because utf8mb4 takes more space
+    public $url;                             // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -24,8 +24,8 @@ class Notice_source extends Managed_DataObject
         return array(
             'fields' => array(
                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'source code'),
         return array(
             'fields' => array(
                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'source code'),
-                'name' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'name of the source'),
-                'url' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'url to link to'),
+                'name' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'name of the source'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'url to link to'),
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'date this record was created'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'date this record was created'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index b29fdfe41b1fb059cb79ae409010950a44be1650..9cf3f5e108849b859018c6520b10c5fc0967b6e8 100644 (file)
@@ -12,14 +12,14 @@ class Oauth_application extends Managed_DataObject
     public $__table = 'oauth_application';               // table name
     public $id;                              // int(4)  primary_key not_null
     public $owner;                           // int(4)   not_null
     public $__table = 'oauth_application';               // table name
     public $id;                              // int(4)  primary_key not_null
     public $owner;                           // int(4)   not_null
-    public $consumer_key;                    // varchar(255)   not_null
-    public $name;                            // varchar(255)   not_null
-    public $description;                     // varchar(255)
-    public $icon;                            // varchar(255)   not_null
-    public $source_url;                      // varchar(255)
-    public $organization;                    // varchar(255)
-    public $homepage;                        // varchar(255)
-    public $callback_url;                    // varchar(255)   not_null
+    public $consumer_key;                    // varchar(191)   not_null   not 255 because utf8mb4 takes more space
+    public $name;                            // varchar(191)   not_null   not 255 because utf8mb4 takes more space
+    public $description;                     // varchar(191)              not 255 because utf8mb4 takes more space
+    public $icon;                            // varchar(191)              not_null   not 255 because utf8mb4 takes more space
+    public $source_url;                      // varchar(191)              not 255 because utf8mb4 takes more space
+    public $organization;                    // varchar(191)              not 255 because utf8mb4 takes more space
+    public $homepage;                        // varchar(191)              not 255 because utf8mb4 takes more space
+    public $callback_url;                    // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $type;                            // tinyint(1)
     public $access_type;                     // tinyint(1)
     public $created;                         // datetime   not_null
     public $type;                            // tinyint(1)
     public $access_type;                     // tinyint(1)
     public $created;                         // datetime   not_null
@@ -43,12 +43,12 @@ class Oauth_application extends Managed_DataObject
     static function maxDesc()
     {
         // This used to default to textlimit or allow unlimited descriptions,
     static function maxDesc()
     {
         // This used to default to textlimit or allow unlimited descriptions,
-        // but this isn't part of a notice and the field's limited to 255 chars
-        // in the DB, so those seem silly.
+        // but this isn't part of a notice and the field's limited to 191 chars
+        // in the DB, so those seem silly. (utf8mb4 takes up more space, so can't use 255)
         //
         //
-        // Now just defaulting to 255 max unless a smaller application desclimit
+        // Now just defaulting to 191 max unless a smaller application desclimit
         // is actually set. Setting to 0 will use the maximum.
         // is actually set. Setting to 0 will use the maximum.
-        $max = 255;
+        $max = 191;
         $desclimit = intval(common_config('application', 'desclimit'));
         if ($desclimit > 0 && $desclimit < $max) {
             return $desclimit;
         $desclimit = intval(common_config('application', 'desclimit'));
         if ($desclimit > 0 && $desclimit < $max) {
             return $desclimit;
@@ -163,14 +163,14 @@ class Oauth_application extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
                 'owner' => array('type' => 'int', 'not null' => true, 'description' => 'owner of the application'),
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
                 'owner' => array('type' => 'int', 'not null' => true, 'description' => 'owner of the application'),
-                'consumer_key' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'application consumer key'),
-                'name' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'name of the application'),
-                'description' => array('type' => 'varchar', 'length' => 255, 'description' => 'description of the application'),
-                'icon' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'application icon'),
-                'source_url' => array('type' => 'varchar', 'length' => 255, 'description' => 'application homepage - used for source link'),
-                'organization' => array('type' => 'varchar', 'length' => 255, 'description' => 'name of the organization running the application'),
-                'homepage' => array('type' => 'varchar', 'length' => 255, 'description' => 'homepage for the organization'),
-                'callback_url' => array('type' => 'varchar', 'length' => 255, 'description' => 'url to redirect to after authentication'),
+                'consumer_key' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'application consumer key'),
+                'name' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'name of the application'),
+                'description' => array('type' => 'varchar', 'length' => 191, 'description' => 'description of the application'),
+                'icon' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'application icon'),
+                'source_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'application homepage - used for source link'),
+                'organization' => array('type' => 'varchar', 'length' => 191, 'description' => 'name of the organization running the application'),
+                'homepage' => array('type' => 'varchar', 'length' => 191, 'description' => 'homepage for the organization'),
+                'callback_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'url to redirect to after authentication'),
                 'type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'type of app, 1 = browser, 2 = desktop'),
                 'access_type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'default access type, bit 1 = read, bit 2 = write'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'type of app, 1 = browser, 2 = desktop'),
                 'access_type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'default access type, bit 1 = read, bit 2 = write'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
index 007e4d1db6656be08b574886f17352f16a462109..60b2e8fa2c505caaca88bc52aeb707cca2aeb2f3 100644 (file)
@@ -13,7 +13,7 @@ class Oauth_application_user extends Managed_DataObject
     public $profile_id;                      // int(4)  primary_key not_null
     public $application_id;                  // int(4)  primary_key not_null
     public $access_type;                     // tinyint(1)
     public $profile_id;                      // int(4)  primary_key not_null
     public $application_id;                  // int(4)  primary_key not_null
     public $access_type;                     // tinyint(1)
-    public $token;                           // varchar(255)
+    public $token;                           // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
@@ -27,7 +27,7 @@ class Oauth_application_user extends Managed_DataObject
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'user of the application'),
                 'application_id' => array('type' => 'int', 'not null' => true, 'description' => 'id of the application'),
                 'access_type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'access type, bit 1 = read, bit 2 = write'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'user of the application'),
                 'application_id' => array('type' => 'int', 'not null' => true, 'description' => 'id of the application'),
                 'access_type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'access type, bit 1 = read, bit 2 = write'),
-                'token' => array('type' => 'varchar', 'length' => 255, 'description' => 'request or access token'),
+                'token' => array('type' => 'varchar', 'length' => 191, 'description' => 'request or access token'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index ec5eae3064016b1778de2741278289034eae41cc..83bc0d80541fe2b9dbd0b3fa047d59156e73a7e2 100644 (file)
@@ -12,7 +12,7 @@ class Oauth_token_association extends Managed_DataObject
     public $__table = 'oauth_token_association';          // table name
     public $profile_id;                      // int(4)  primary_key not_null
     public $application_id;                  // int(4)  primary_key not_null
     public $__table = 'oauth_token_association';          // table name
     public $profile_id;                      // int(4)  primary_key not_null
     public $application_id;                  // int(4)  primary_key not_null
-    public $token;                           // varchar(255) primary key not null
+    public $token;                           // varchar(191) primary key not null   not 255 because utf8mb4 takes more space
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime   not_null
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
 
@@ -43,7 +43,7 @@ class Oauth_token_association extends Managed_DataObject
             'fields' => array(
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'associated user'),
                 'application_id' => array('type' => 'int', 'not null' => true, 'description' => 'the application'),
             'fields' => array(
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'associated user'),
                 'application_id' => array('type' => 'int', 'not null' => true, 'description' => 'the application'),
-                'token' => array('type' => 'varchar', 'length' => '255', 'not null' => true, 'description' => 'token used for this association'),
+                'token' => array('type' => 'varchar', 'length' => '191', 'not null' => true, 'description' => 'token used for this association'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 0b608fbb24883164733d90560d8c9a8c1c5cbbcc..b1c29041dffdddd8e20995d18b0f5c838cb62fca 100644 (file)
@@ -30,11 +30,11 @@ class Profile extends Managed_DataObject
     public $__table = 'profile';                         // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)  multiple_key not_null
     public $__table = 'profile';                         // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)  multiple_key not_null
-    public $fullname;                        // varchar(255)  multiple_key
-    public $profileurl;                      // varchar(255)
-    public $homepage;                        // varchar(255)  multiple_key
+    public $fullname;                        // varchar(191)  multiple_key   not 255 because utf8mb4 takes more space
+    public $profileurl;                      // varchar(191)                 not 255 because utf8mb4 takes more space
+    public $homepage;                        // varchar(191)  multiple_key   not 255 because utf8mb4 takes more space
     public $bio;                             // text()  multiple_key
     public $bio;                             // text()  multiple_key
-    public $location;                        // varchar(255)  multiple_key
+    public $location;                        // varchar(191)  multiple_key   not 255 because utf8mb4 takes more space
     public $lat;                             // decimal(10,7)
     public $lon;                             // decimal(10,7)
     public $location_id;                     // int(4)
     public $lat;                             // decimal(10,7)
     public $lon;                             // decimal(10,7)
     public $location_id;                     // int(4)
@@ -49,11 +49,11 @@ class Profile extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
                 'nickname' => array('type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'nickname or username', 'collate' => 'utf8_general_ci'),
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
                 'nickname' => array('type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'nickname or username', 'collate' => 'utf8_general_ci'),
-                'fullname' => array('type' => 'varchar', 'length' => 255, 'description' => 'display name', 'collate' => 'utf8_general_ci'),
-                'profileurl' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL, cached so we dont regenerate'),
-                'homepage' => array('type' => 'varchar', 'length' => 255, 'description' => 'identifying URL', 'collate' => 'utf8_general_ci'),
+                'fullname' => array('type' => 'varchar', 'length' => 191, 'description' => 'display name', 'collate' => 'utf8_general_ci'),
+                'profileurl' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL, cached so we dont regenerate'),
+                'homepage' => array('type' => 'varchar', 'length' => 191, 'description' => 'identifying URL', 'collate' => 'utf8_general_ci'),
                 'bio' => array('type' => 'text', 'description' => 'descriptive biography', 'collate' => 'utf8_general_ci'),
                 'bio' => array('type' => 'text', 'description' => 'descriptive biography', 'collate' => 'utf8_general_ci'),
-                'location' => array('type' => 'varchar', 'length' => 255, 'description' => 'physical location', 'collate' => 'utf8_general_ci'),
+                'location' => array('type' => 'varchar', 'length' => 191, 'description' => 'physical location', 'collate' => 'utf8_general_ci'),
                 'lat' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'latitude'),
                 'lon' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'longitude'),
                 'location_id' => array('type' => 'int', 'description' => 'location id if possible'),
                 'lat' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'latitude'),
                 'lon' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'longitude'),
                 'location_id' => array('type' => 'int', 'description' => 'location id if possible'),
index 0ad8106e3187d10b88da3dcfe0d45857d146c2f5..2b3d2aa5ad4dd87e73f6d86bf94bb0f2886cb392 100644 (file)
@@ -43,8 +43,8 @@ class Profile_list extends Managed_DataObject
     public $private;                         // tinyint(1)
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $private;                         // tinyint(1)
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
-    public $uri;                             // varchar(255)  unique_key
-    public $mainpage;                        // varchar(255)
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
+    public $mainpage;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $tagged_count;                    // smallint
     public $subscriber_count;                // smallint
 
     public $tagged_count;                    // smallint
     public $subscriber_count;                // smallint
 
@@ -64,8 +64,8 @@ class Profile_list extends Managed_DataObject
                 'created' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was added'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was modified'),
 
                 'created' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was added'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was modified'),
 
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'),
-                'mainpage' => array('type' => 'varchar', 'length' => 255, 'description' => 'page to link to'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'),
+                'mainpage' => array('type' => 'varchar', 'length' => 191, 'description' => 'page to link to'),
                 'tagged_count' => array('type' => 'int', 'default' => 0, 'description' => 'number of people tagged with this tag by this user'),
                 'subscriber_count' => array('type' => 'int', 'default' => 0, 'description' => 'number of subscribers to this tag'),
             ),
                 'tagged_count' => array('type' => 'int', 'default' => 0, 'description' => 'number of people tagged with this tag by this user'),
                 'subscriber_count' => array('type' => 'int', 'default' => 0, 'description' => 'number of subscribers to this tag'),
             ),
index ee0fa0e27cce09c96a5e2d568a9c9558397bf518..27034390f848d4293ff35f701b95d2ac2ef57a77 100644 (file)
@@ -31,8 +31,8 @@ class Profile_prefs extends Managed_DataObject
 {
     public $__table = 'profile_prefs';       // table name
     public $profile_id;                      // int(4)  primary_key not_null
 {
     public $__table = 'profile_prefs';       // table name
     public $profile_id;                      // int(4)  primary_key not_null
-    public $namespace;                       // varchar(255)  not_null
-    public $topic;                           // varchar(255)  not_null
+    public $namespace;                       // varchar(191)  not_null
+    public $topic;                           // varchar(191)  not_null
     public $data;                            // text
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $data;                            // text
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
@@ -42,8 +42,8 @@ class Profile_prefs extends Managed_DataObject
         return array(
             'fields' => array(
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'),
         return array(
             'fields' => array(
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'),
-                'namespace' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'namespace, like pluginname or category'),
-                'topic' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'preference key, i.e. description, age...'),
+                'namespace' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'namespace, like pluginname or category'),
+                'topic' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'preference key, i.e. description, age...'),
                 'data' => array('type' => 'blob', 'description' => 'topic data, may be anything'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'data' => array('type' => 'blob', 'description' => 'topic data, may be anything'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index 7d3a5fc0ca22a5432cf5baf8393e46d6b7fd2fb3..d37cf42d970a0b2928e1948da732efed0bb73795 100644 (file)
@@ -12,7 +12,7 @@ class Sms_carrier extends Managed_DataObject
     public $__table = 'sms_carrier';                     // table name
     public $id;                              // int(4)  primary_key not_null
     public $name;                            // varchar(64)  unique_key
     public $__table = 'sms_carrier';                     // table name
     public $id;                              // int(4)  primary_key not_null
     public $name;                            // varchar(64)  unique_key
-    public $email_pattern;                   // varchar(255)   not_null
+    public $email_pattern;                   // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -30,7 +30,7 @@ class Sms_carrier extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'primary key for SMS carrier'),
                 'name' => array('type' => 'varchar', 'length' => 64, 'description' => 'name of the carrier'),
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'primary key for SMS carrier'),
                 'name' => array('type' => 'varchar', 'length' => 64, 'description' => 'name of the carrier'),
-                'email_pattern' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'sprintf pattern for making an email address from a phone number'),
+                'email_pattern' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'sprintf pattern for making an email address from a phone number'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index ffbf9d5a3c0efd0c9c708739aff459a9702bc117..3498b4bd24b4ae18a0a9f5213ff9666beff92977 100644 (file)
@@ -29,15 +29,15 @@ class Status_network extends Safe_DataObject
     public $__table = 'status_network';                  // table name
     public $site_id;                         // int(4) primary_key not_null
     public $nickname;                        // varchar(64)   unique_key not_null
     public $__table = 'status_network';                  // table name
     public $site_id;                         // int(4) primary_key not_null
     public $nickname;                        // varchar(64)   unique_key not_null
-    public $hostname;                        // varchar(255)  unique_key
-    public $pathname;                        // varchar(255)  unique_key
-    public $dbhost;                          // varchar(255)
-    public $dbuser;                          // varchar(255)
-    public $dbpass;                          // varchar(255)
-    public $dbname;                          // varchar(255)
-    public $sitename;                        // varchar(255)
-    public $theme;                           // varchar(255)
-    public $logo;                            // varchar(255)
+    public $hostname;                        // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
+    public $pathname;                        // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
+    public $dbhost;                          // varchar(191)               not 255 because utf8mb4 takes more space
+    public $dbuser;                          // varchar(191)               not 255 because utf8mb4 takes more space
+    public $dbpass;                          // varchar(191)               not 255 because utf8mb4 takes more space
+    public $dbname;                          // varchar(191)               not 255 because utf8mb4 takes more space
+    public $sitename;                        // varchar(191)               not 255 because utf8mb4 takes more space
+    public $theme;                           // varchar(191)               not 255 because utf8mb4 takes more space
+    public $logo;                            // varchar(191)               not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
index 4d7eb524dcf8d89da61e4ba15d9a2bac39d7b7cc..9ef19e2f669f9e8e61e5e06e942c11c393d263d2 100644 (file)
@@ -32,9 +32,9 @@ class Subscription extends Managed_DataObject
     public $subscribed;                      // int(4)  primary_key not_null
     public $jabber;                          // tinyint(1)   default_1
     public $sms;                             // tinyint(1)   default_1
     public $subscribed;                      // int(4)  primary_key not_null
     public $jabber;                          // tinyint(1)   default_1
     public $sms;                             // tinyint(1)   default_1
-    public $token;                           // varchar(255)
-    public $secret;                          // varchar(255)
-    public $uri;                             // varchar(255)
+    public $token;                           // varchar(191)   not 255 because utf8mb4 takes more space
+    public $secret;                          // varchar(191)   not 255 because utf8mb4 takes more space
+    public $uri;                             // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -46,9 +46,9 @@ class Subscription extends Managed_DataObject
                 'subscribed' => array('type' => 'int', 'not null' => true, 'description' => 'profile being listened to'),
                 'jabber' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver jabber messages'),
                 'sms' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver sms messages'),
                 'subscribed' => array('type' => 'int', 'not null' => true, 'description' => 'profile being listened to'),
                 'jabber' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver jabber messages'),
                 'sms' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver sms messages'),
-                'token' => array('type' => 'varchar', 'length' => 255, 'description' => 'authorization token'),
-                'secret' => array('type' => 'varchar', 'length' => 255, 'description' => 'token secret'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier'),
+                'token' => array('type' => 'varchar', 'length' => 191, 'description' => 'authorization token'),
+                'secret' => array('type' => 'varchar', 'length' => 191, 'description' => 'token secret'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 8d8a4d1c113db4719ff9db2fc9e139ef65ca5f7d..89b3f4ecf1de24f646a3e4eb039e6b64616c8b60 100644 (file)
@@ -10,13 +10,13 @@ class Token extends Managed_DataObject
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'token';                           // table name
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'token';                           // table name
-    public $consumer_key;                    // varchar(255)  primary_key not_null
+    public $consumer_key;                    // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
     public $tok;                             // char(32)  primary_key not_null
     public $secret;                          // char(32)   not_null
     public $type;                            // tinyint(1)   not_null
     public $state;                           // tinyint(1)
     public $tok;                             // char(32)  primary_key not_null
     public $secret;                          // char(32)   not_null
     public $type;                            // tinyint(1)   not_null
     public $state;                           // tinyint(1)
-    public $verifier;                        // varchar(255)
-    public $verified_callback;               // varchar(255)
+    public $verifier;                        // varchar(191)   not 255 because utf8mb4 takes more space
+    public $verified_callback;               // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -27,13 +27,13 @@ class Token extends Managed_DataObject
         return array(
             'description' => 'OAuth token record',
             'fields' => array(
         return array(
             'description' => 'OAuth token record',
             'fields' => array(
-                'consumer_key' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'unique identifier, root URL'),
+                'consumer_key' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'unique identifier, root URL'),
                 'tok' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'identifying value'),
                 'secret' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'secret value'),
                 'type' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'request or access'),
                 'state' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'for requests, 0 = initial, 1 = authorized, 2 = used'),
                 'tok' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'identifying value'),
                 'secret' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'secret value'),
                 'type' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'request or access'),
                 'state' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'for requests, 0 = initial, 1 = authorized, 2 = used'),
-                'verifier' => array('type' => 'varchar', 'length' => 255, 'description' => 'verifier string for OAuth 1.0a'),
-                'verified_callback' => array('type' => 'varchar', 'length' => 255, 'description' => 'verified callback URL for OAuth 1.0a'),
+                'verifier' => array('type' => 'varchar', 'length' => 191, 'description' => 'verifier string for OAuth 1.0a'),
+                'verified_callback' => array('type' => 'varchar', 'length' => 191, 'description' => 'verified callback URL for OAuth 1.0a'),
 
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
 
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index 7a19ae3a0a04cbf9e39cdb5d724106292078d78b..a719bec8eff0fab3b42a65893a7772353eeffdd6 100644 (file)
@@ -34,9 +34,9 @@ class User extends Managed_DataObject
     public $__table = 'user';                            // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)  unique_key
     public $__table = 'user';                            // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)  unique_key
-    public $password;                        // varchar(255)
-    public $email;                           // varchar(255)  unique_key
-    public $incomingemail;                   // varchar(255)  unique_key
+    public $password;                        // varchar(191)               not 255 because utf8mb4 takes more space
+    public $email;                           // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
+    public $incomingemail;                   // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $emailnotifysub;                  // tinyint(1)   default_1
     public $emailnotifyfav;                  // tinyint(1)   default_1
     public $emailnotifynudge;                // tinyint(1)   default_1
     public $emailnotifysub;                  // tinyint(1)   default_1
     public $emailnotifyfav;                  // tinyint(1)   default_1
     public $emailnotifynudge;                // tinyint(1)   default_1
@@ -50,8 +50,8 @@ class User extends Managed_DataObject
     public $carrier;                         // int(4)
     public $smsnotify;                       // tinyint(1)
     public $smsreplies;                      // tinyint(1)
     public $carrier;                         // int(4)
     public $smsnotify;                       // tinyint(1)
     public $smsreplies;                      // tinyint(1)
-    public $smsemail;                        // varchar(255)
-    public $uri;                             // varchar(255)  unique_key
+    public $smsemail;                        // varchar(191)               not 255 because utf8mb4 takes more space
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $autosubscribe;                   // tinyint(1)
     public $subscribe_policy;                // tinyint(1)
     public $urlshorteningservice;            // varchar(50)   default_ur1.ca
     public $autosubscribe;                   // tinyint(1)
     public $subscribe_policy;                // tinyint(1)
     public $urlshorteningservice;            // varchar(50)   default_ur1.ca
@@ -69,9 +69,9 @@ class User extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
                 'nickname' => array('type' => 'varchar', 'length' => 64, 'description' => 'nickname or username, duped in profile'),
             'fields' => array(
                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
                 'nickname' => array('type' => 'varchar', 'length' => 64, 'description' => 'nickname or username, duped in profile'),
-                'password' => array('type' => 'varchar', 'length' => 255, 'description' => 'salted password, can be null for OpenID users'),
-                'email' => array('type' => 'varchar', 'length' => 255, 'description' => 'email address for password recovery etc.'),
-                'incomingemail' => array('type' => 'varchar', 'length' => 255, 'description' => 'email address for post-by-email'),
+                'password' => array('type' => 'varchar', 'length' => 191, 'description' => 'salted password, can be null for OpenID users'),
+                'email' => array('type' => 'varchar', 'length' => 191, 'description' => 'email address for password recovery etc.'),
+                'incomingemail' => array('type' => 'varchar', 'length' => 191, 'description' => 'email address for post-by-email'),
                 'emailnotifysub' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'Notify by email of subscriptions'),
                 'emailnotifyfav' => array('type' => 'int', 'size' => 'tiny', 'default' => null, 'description' => 'Notify by email of favorites'),
                 'emailnotifynudge' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'Notify by email of nudges'),
                 'emailnotifysub' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'Notify by email of subscriptions'),
                 'emailnotifyfav' => array('type' => 'int', 'size' => 'tiny', 'default' => null, 'description' => 'Notify by email of favorites'),
                 'emailnotifynudge' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'Notify by email of nudges'),
@@ -85,8 +85,8 @@ class User extends Managed_DataObject
                 'carrier' => array('type' => 'int', 'description' => 'foreign key to sms_carrier'),
                 'smsnotify' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'whether to send notices to SMS'),
                 'smsreplies' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'whether to send notices to SMS on replies'),
                 'carrier' => array('type' => 'int', 'description' => 'foreign key to sms_carrier'),
                 'smsnotify' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'whether to send notices to SMS'),
                 'smsreplies' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'whether to send notices to SMS on replies'),
-                'smsemail' => array('type' => 'varchar', 'length' => 255, 'description' => 'built from sms and carrier'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier, usually a tag URI'),
+                'smsemail' => array('type' => 'varchar', 'length' => 191, 'description' => 'built from sms and carrier'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier, usually a tag URI'),
                 'autosubscribe' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'automatically subscribe to users who subscribe to us'),
                 'subscribe_policy' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => '0 = anybody can subscribe; 1 = require approval'),
                 'urlshorteningservice' => array('type' => 'varchar', 'length' => 50, 'default' => 'internal', 'description' => 'service to use for auto-shortening URLs'),
                 'autosubscribe' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'automatically subscribe to users who subscribe to us'),
                 'subscribe_policy' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => '0 = anybody can subscribe; 1 = require approval'),
                 'urlshorteningservice' => array('type' => 'varchar', 'length' => 50, 'default' => 'internal', 'description' => 'service to use for auto-shortening URLs'),
index 875f5d650e9ca5d036217e36896f5933e2b7d961..3dc5fd4b2d8e0e1e799fad943b59301621a05ee3 100644 (file)
@@ -15,18 +15,18 @@ class User_group extends Managed_DataObject
     public $__table = 'user_group';                      // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)
     public $__table = 'user_group';                      // table name
     public $id;                              // int(4)  primary_key not_null
     public $nickname;                        // varchar(64)
-    public $fullname;                        // varchar(255)
-    public $homepage;                        // varchar(255)
+    public $fullname;                        // varchar(191)   not 255 because utf8mb4 takes more space
+    public $homepage;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $description;                     // text
     public $description;                     // text
-    public $location;                        // varchar(255)
-    public $original_logo;                   // varchar(255)
-    public $homepage_logo;                   // varchar(255)
-    public $stream_logo;                     // varchar(255)
-    public $mini_logo;                       // varchar(255)
+    public $location;                        // varchar(191)   not 255 because utf8mb4 takes more space
+    public $original_logo;                   // varchar(191)   not 255 because utf8mb4 takes more space
+    public $homepage_logo;                   // varchar(191)   not 255 because utf8mb4 takes more space
+    public $stream_logo;                     // varchar(191)   not 255 because utf8mb4 takes more space
+    public $mini_logo;                       // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
     public $created;                         // datetime   not_null default_0000-00-00%2000%3A00%3A00
     public $modified;                        // timestamp   not_null default_CURRENT_TIMESTAMP
-    public $uri;                             // varchar(255)  unique_key
-    public $mainpage;                        // varchar(255)
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
+    public $mainpage;                        // varchar(191)   not 255 because utf8mb4 takes more space
     public $join_policy;                     // tinyint
     public $force_scope;                     // tinyint
 
     public $join_policy;                     // tinyint
     public $force_scope;                     // tinyint
 
@@ -41,21 +41,21 @@ class User_group extends Managed_DataObject
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
 
                 'nickname' => array('type' => 'varchar', 'length' => 64, 'description' => 'nickname for addressing'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
 
                 'nickname' => array('type' => 'varchar', 'length' => 64, 'description' => 'nickname for addressing'),
-                'fullname' => array('type' => 'varchar', 'length' => 255, 'description' => 'display name'),
-                'homepage' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL, cached so we dont regenerate'),
+                'fullname' => array('type' => 'varchar', 'length' => 191, 'description' => 'display name'),
+                'homepage' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL, cached so we dont regenerate'),
                 'description' => array('type' => 'text', 'description' => 'group description'),
                 'description' => array('type' => 'text', 'description' => 'group description'),
-                'location' => array('type' => 'varchar', 'length' => 255, 'description' => 'related physical location, if any'),
+                'location' => array('type' => 'varchar', 'length' => 191, 'description' => 'related physical location, if any'),
 
 
-                'original_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'original size logo'),
-                'homepage_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'homepage (profile) size logo'),
-                'stream_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'stream-sized logo'),
-                'mini_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'mini logo'),
+                'original_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'original size logo'),
+                'homepage_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'homepage (profile) size logo'),
+                'stream_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'stream-sized logo'),
+                'mini_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'mini logo'),
 
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
 
 
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
 
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'),
-                'mainpage' => array('type' => 'varchar', 'length' => 255, 'description' => 'page for group info to link to'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'),
+                'mainpage' => array('type' => 'varchar', 'length' => 191, 'description' => 'page for group info to link to'),
                 'join_policy' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=open; 1=requires admin approval'),      
                 'force_scope' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=never,1=sometimes,-1=always'),
             ),
                 'join_policy' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=open; 1=requires admin approval'),      
                 'force_scope' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=never,1=sometimes,-1=always'),
             ),
index cba91ea252cc41a28ff27f42eccb4003af01ce50..16fd030bb42ce43c35307ef4d8826fb3fa5fd263 100644 (file)
@@ -36,8 +36,8 @@ class User_im_prefs extends Managed_DataObject
 
     public $__table = 'user_im_prefs';       // table name
     public $user_id;                         // int(4)  primary_key not_null
 
     public $__table = 'user_im_prefs';       // table name
     public $user_id;                         // int(4)  primary_key not_null
-    public $screenname;                      // varchar(255)  not_null
-    public $transport;                       // varchar(255)  not_null
+    public $screenname;                      // varchar(191)  not_null   not 255 because utf8mb4 takes more space
+    public $transport;                       // varchar(191)  not_null   not 255 because utf8mb4 takes more space
     public $notify;                          // tinyint(1)
     public $replies;                         // tinyint(1)
     public $microid;                         // tinyint(1)
     public $notify;                          // tinyint(1)
     public $replies;                         // tinyint(1)
     public $microid;                         // tinyint(1)
@@ -53,8 +53,8 @@ class User_im_prefs extends Managed_DataObject
         return array(
             'fields' => array(
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'),
         return array(
             'fields' => array(
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'),
-                'screenname' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'screenname on this service'),
-                'transport' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'transport (ex xmpp, aim)'),
+                'screenname' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'screenname on this service'),
+                'transport' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'transport (ex xmpp, aim)'),
                 'notify' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Notify when a new notice is sent'),
                 'replies' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Send replies  from people not subscribed to'),
                 'microid' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'Publish a MicroID'),
                 'notify' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Notify when a new notice is sent'),
                 'replies' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 0, 'description' => 'Send replies  from people not subscribed to'),
                 'microid' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'Publish a MicroID'),
index b252ee31565f58234859ca87ac1eaa23bdd7123e..0173a6efc4a0d647c76122014841363d2ce47946 100644 (file)
@@ -11,8 +11,8 @@ class User_username extends Managed_DataObject
 
     public $__table = 'user_username';                     // table name
     public $user_id;                        // int(4)  not_null
 
     public $__table = 'user_username';                     // table name
     public $user_id;                        // int(4)  not_null
-    public $provider_name;                  // varchar(255)  primary_key not_null
-    public $username;                       // varchar(255)  primary_key not_null
+    public $provider_name;                  // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
+    public $username;                       // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
     public $created;                        // datetime()   not_null
     public $modified;                       // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                        // datetime()   not_null
     public $modified;                       // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -23,8 +23,8 @@ class User_username extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'provider_name' => array('type' => 'varchar', 'length' => 255, 'description' => 'provider name'),
-                'username' => array('type' => 'varchar', 'length' => 255, 'description' => 'username'),
+                'provider_name' => array('type' => 'varchar', 'length' => 191, 'description' => 'provider name'),
+                'username' => array('type' => 'varchar', 'length' => 191, 'description' => 'username'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice id this title relates to'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice id this title relates to'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index c630a83d522cfdbf7c35f72adfb572d65b5b5bbb..5e9693f5f71ac5b7d0fa4dad3dd9db1905c707fe 100644 (file)
@@ -21,7 +21,7 @@ create table status_network (
     created datetime not null comment 'date this record was created',
     modified timestamp comment 'date this record was modified'
 
     created datetime not null comment 'date this record was created',
     modified timestamp comment 'date this record was modified'
 
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
+) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
 
 create table status_network_tag (
     site_id integer  comment 'unique id',
 
 create table status_network_tag (
     site_id integer  comment 'unique id',
@@ -30,5 +30,5 @@ create table status_network_tag (
 
     constraint primary key (site_id, tag),
     index status_network_tag_tag_idx (tag)
 
     constraint primary key (site_id, tag),
     index status_network_tag_tag_idx (tag)
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
+) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
 
 
index a511979e67a74816f1facdcedc7c2ec2e16dde01..75ed028c0cbf5ac248b310e1235b8aa06edd4274 100644 (file)
@@ -961,6 +961,7 @@ class DB_Error extends PEAR_Error
     function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN,
                       $level = E_USER_NOTICE, $debuginfo = null)
     {
     function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN,
                       $level = E_USER_NOTICE, $debuginfo = null)
     {
+        common_debug(var_export($debuginfo,true));
         if (is_int($code)) {
             $this->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code,
                               $mode, $level, $debuginfo);
         if (is_int($code)) {
             $this->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code,
                               $mode, $level, $debuginfo);
index aa52fa361ca570f5605690fdbd0a3712387a719c..e6bb41091e1d6f9f104c0b5f50adfb94b1c0092c 100644 (file)
@@ -139,6 +139,11 @@ class Event {
         return false;
     }
 
         return false;
     }
 
+    public static function getHandlers($name)
+    {
+        return Event::$_handlers[$name];
+    }
+
     /**
      * Disables any and all handlers that have been set up so far;
      * use only if you know it's safe to reinitialize all plugins.
     /**
      * Disables any and all handlers that have been set up so far;
      * use only if you know it's safe to reinitialize all plugins.
index 435ba4e3a95f57f3ca0ba314db4fb483d0ca0b83..f1fc0f46ecd5c600fa12c4d4e128387288718ac1 100644 (file)
@@ -271,7 +271,7 @@ class MysqlSchema extends Schema
     function endCreateTable($name, array $def)
     {
         $engine = $this->preferredEngine($def);
     function endCreateTable($name, array $def)
     {
         $engine = $this->preferredEngine($def);
-        return ") ENGINE=$engine CHARACTER SET utf8 COLLATE utf8_bin";
+        return ") ENGINE=$engine CHARACTER SET utf8mb4 COLLATE utf8mb4_bin";
     }
     
     function preferredEngine($def)
     }
     
     function preferredEngine($def)
@@ -335,9 +335,10 @@ class MysqlSchema extends Schema
         if (strtolower($oldProps['ENGINE']) != strtolower($engine)) {
             $phrase[] = "ENGINE=$engine";
         }
         if (strtolower($oldProps['ENGINE']) != strtolower($engine)) {
             $phrase[] = "ENGINE=$engine";
         }
-        if (strtolower($oldProps['TABLE_COLLATION']) != 'utf8_bin') {
-            $phrase[] = 'DEFAULT CHARSET=utf8';
-            $phrase[] = 'COLLATE=utf8_bin';
+        if (strtolower($oldProps['TABLE_COLLATION']) != 'utf8mb4_bin') {
+            $phrase[] = 'CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin';
+            $phrase[] = 'DEFAULT CHARACTER SET = utf8mb4';
+            $phrase[] = 'DEFAULT COLLATE = utf8mb4_bin';
         }
     }
 
         }
     }
 
index fb2712f5658189c7e25eaff70ed37bfaae0ab461..fe357941c03bcc4fe88a90a2cc550280ab15282f 100644 (file)
@@ -47,7 +47,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
 class Homepage_blacklist extends Managed_DataObject
 {
     public $__table = 'homepage_blacklist'; // table name
 class Homepage_blacklist extends Managed_DataObject
 {
     public $__table = 'homepage_blacklist'; // table name
-    public $pattern;                        // varchar(255) pattern
+    public $pattern;                        // varchar(191) pattern   not 255 because utf8mb4 takes more space
     public $created;                        // datetime not_null
     public $modified;                       // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                        // datetime not_null
     public $modified;                       // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -55,7 +55,7 @@ class Homepage_blacklist extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'pattern' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'blacklist pattern'),
+                'pattern' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'blacklist pattern'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index f4f387a2e02e6524a46d96c77d83dd0937d1bae2..b045fd17cebfdd5c170e1fee326139fb15a35cbc 100644 (file)
@@ -47,7 +47,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
 class Nickname_blacklist extends Managed_DataObject
 {
     public $__table = 'nickname_blacklist'; // table name
 class Nickname_blacklist extends Managed_DataObject
 {
     public $__table = 'nickname_blacklist'; // table name
-    public $pattern;                        // varchar(255) pattern
+    public $pattern;                        // varchar(191) pattern   not 255 because utf8mb4 takes more space
     public $created;                        // datetime not_null
     public $modified;                       // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                        // datetime not_null
     public $modified;                       // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -55,7 +55,7 @@ class Nickname_blacklist extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'pattern' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'blacklist pattern'),
+                'pattern' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'blacklist pattern'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index 1f585dce4ff854c15b5b1c5ac8d0f7cebbd89671..557e50759be04fe4bcc58fcf97132eb508083a03 100644 (file)
@@ -51,11 +51,11 @@ class Blog_entry extends Managed_DataObject
 
     public $id; // UUID
     public $profile_id; // int
 
     public $id; // UUID
     public $profile_id; // int
-    public $title; // varchar(255)
+    public $title; // varchar(191)   not 255 because utf8mb4 takes more space
     public $summary; // text
     public $content; // text
     public $summary; // text
     public $content; // text
-    public $uri; // text
-    public $url; // text
+    public $uri; // varchar(191)   not 255 because utf8mb4 takes more space
+    public $url; // varchar(191)   not 255 because utf8mb4 takes more space
     public $created; // datetime
     public $modified; // datetime
 
     public $created; // datetime
     public $modified; // datetime
 
@@ -74,17 +74,17 @@ class Blog_entry extends Managed_DataObject
                                       'not null' => true,
                                       'description' => 'Author profile ID'),
                 'title' => array('type' => 'varchar',
                                       'not null' => true,
                                       'description' => 'Author profile ID'),
                 'title' => array('type' => 'varchar',
-                                 'length' => 255,
+                                 'length' => 191,
                                  'description' => 'title of the entry'),
                 'summary' => array('type' => 'text',
                                    'description' => 'initial summary'),
                 'content' => array('type' => 'text',
                                    'description' => 'HTML content of the entry'),
                 'uri' => array('type' => 'varchar',
                                  'description' => 'title of the entry'),
                 'summary' => array('type' => 'text',
                                    'description' => 'initial summary'),
                 'content' => array('type' => 'text',
                                    'description' => 'HTML content of the entry'),
                 'uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'description' => 'URI (probably http://) for this entry'),
                 'url' => array('type' => 'varchar',
                                'description' => 'URI (probably http://) for this entry'),
                 'url' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'description' => 'URL (probably http://) for this entry'),
                 'created' => array('type' => 'datetime',
                                    'not null' => true,
                                'description' => 'URL (probably http://) for this entry'),
                 'created' => array('type' => 'datetime',
                                    'not null' => true,
index a99df87ee3d7da8da3a2117839f9d4d3a96d7a58..ade6b4fa7bb6fe4018410388206061dba635d8a5 100644 (file)
@@ -47,10 +47,10 @@ class Bookmark extends Managed_DataObject
     public $__table = 'bookmark'; // table name
     public $id;          // char(36) primary_key not_null
     public $profile_id;  // int(4) not_null
     public $__table = 'bookmark'; // table name
     public $id;          // char(36) primary_key not_null
     public $profile_id;  // int(4) not_null
-    public $url;         // varchar(255) not_null
-    public $title;       // varchar(255)
+    public $url;         // varchar(191) not_null   not 255 because utf8mb4 takes more space
+    public $title;       // varchar(191)   not 255 because utf8mb4 takes more space
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $description; // text
     public $description; // text
-    public $uri;         // varchar(255)
     public $created;     // datetime
 
     public static function schemaDef()
     public $created;     // datetime
 
     public static function schemaDef()
@@ -62,12 +62,12 @@ class Bookmark extends Managed_DataObject
                             'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
                 'uri' => array('type' => 'varchar',
                             'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
                 'uri' => array('type' => 'varchar',
-                            'length' => 255,
+                            'length' => 191,
                             'not null' => true),
                 'url' => array('type' => 'varchar',
                             'not null' => true),
                 'url' => array('type' => 'varchar',
-                            'length' => 255,
+                            'length' => 191,
                             'not null' => true),
                             'not null' => true),
-                'title' => array('type' => 'varchar', 'length' => 255),
+                'title' => array('type' => 'varchar', 'length' => 191),
                 'description' => array('type' => 'text'),
                 'created' => array('type' => 'datetime', 'not null' => true),
             ),
                 'description' => array('type' => 'text'),
                 'created' => array('type' => 'datetime', 'not null' => true),
             ),
index 3818a38f48ffcc6dfee7635036644866cf160685..5f8d27b4f1584fa86069382de1dbcd344ab4e09b 100644 (file)
@@ -13,12 +13,12 @@ class Message extends Managed_DataObject
 
     public $__table = 'message';                         // table name
     public $id;                              // int(4)  primary_key not_null
 
     public $__table = 'message';                         // table name
     public $id;                              // int(4)  primary_key not_null
-    public $uri;                             // varchar(255)  unique_key
+    public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
     public $from_profile;                    // int(4)   not_null
     public $to_profile;                      // int(4)   not_null
     public $content;                         // text()
     public $rendered;                        // text()
     public $from_profile;                    // int(4)   not_null
     public $to_profile;                      // int(4)   not_null
     public $content;                         // text()
     public $rendered;                        // text()
-    public $url;                             // varchar(255)
+    public $url;                             // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $source;                          // varchar(32)
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $source;                          // varchar(32)
@@ -31,12 +31,12 @@ class Message extends Managed_DataObject
         return array(
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
         return array(
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier'),
                 'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'who the message is from'),
                 'to_profile' => array('type' => 'int', 'not null' => true, 'description' => 'who the message is to'),
                 'content' => array('type' => 'text', 'description' => 'message content'),
                 'rendered' => array('type' => 'text', 'description' => 'HTML version of the content'),
                 'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'who the message is from'),
                 'to_profile' => array('type' => 'int', 'not null' => true, 'description' => 'who the message is to'),
                 'content' => array('type' => 'text', 'description' => 'message content'),
                 'rendered' => array('type' => 'text', 'description' => 'HTML version of the content'),
-                'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL of any attachment (image, video, bookmark, whatever)'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL of any attachment (image, video, bookmark, whatever)'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'source' => array('type' => 'varchar', 'length' => 32, 'description' => 'source of comment, like "web", "im", or "clientname"'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'source' => array('type' => 'varchar', 'length' => 32, 'description' => 'source of comment, like "web", "im", or "clientname"'),
index 235305f04722a3c26587edfa9a2287012879b9dc..7af2cdf5e6ac776f49d43b37e225d80d83798c98 100644 (file)
@@ -30,8 +30,8 @@ class Email_reminder extends Managed_DataObject
 {
     public $__table = 'email_reminder';
 
 {
     public $__table = 'email_reminder';
 
-    public $type;     // type of reminder
-    public $code;     // confirmation code
+    public $type;     // type of reminder varchar(191)    not 255 because utf8mb4 takes more space
+    public $code;     // confirmation code varchar(191)   not 255 because utf8mb4 takes more space
     public $days;     // number of days after code was created
     public $sent;     // timestamp
     public $created;  // timestamp
     public $days;     // number of days after code was created
     public $sent;     // timestamp
     public $created;  // timestamp
@@ -102,14 +102,14 @@ class Email_reminder extends Managed_DataObject
             'fields'      => array(
                 'type'     => array(
                     'type'          => 'varchar',
             'fields'      => array(
                 'type'     => array(
                     'type'          => 'varchar',
-                    'length'        => 255,
+                    'length'        => 191,
                     'not null'      => true,
                     'description'   => 'type of reminder'
                 ),
                 'code' => array(
                     'type'        => 'varchar',
                     'not null'    => 'true',
                     'not null'      => true,
                     'description'   => 'type of reminder'
                 ),
                 'code' => array(
                     'type'        => 'varchar',
                     'not null'    => 'true',
-                    'length'      => 255,
+                    'length'      => 191,
                     'description' => 'confirmation code'
                  ),
                 'days' => array(
                     'description' => 'confirmation code'
                  ),
                 'days' => array(
index 3a094ece6cf3fe34672784e60544d3872b8a28d8..733235655c28c9faca4f72fe5d6ce138e70f2bd4 100644 (file)
@@ -53,13 +53,13 @@ class Happening extends Managed_DataObject
 
     public $__table = 'happening'; // table name
     public $id;                    // varchar(36) UUID
 
     public $__table = 'happening'; // table name
     public $id;                    // varchar(36) UUID
-    public $uri;                   // varchar(255)
+    public $uri;                   // varchar(191)   not 255 because utf8mb4 takes more space
     public $profile_id;            // int
     public $start_time;            // datetime
     public $end_time;              // datetime
     public $profile_id;            // int
     public $start_time;            // datetime
     public $end_time;              // datetime
-    public $title;                 // varchar(255)
-    public $location;              // varchar(255)
-    public $url;                   // varchar(255)
+    public $title;                 // varchar(191)   not 255 because utf8mb4 takes more space
+    public $location;              // varchar(191)   not 255 because utf8mb4 takes more space
+    public $url;                   // varchar(191)   not 255 because utf8mb4 takes more space
     public $description;           // text
     public $created;               // datetime
 
     public $description;           // text
     public $created;               // datetime
 
@@ -76,18 +76,18 @@ class Happening extends Managed_DataObject
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
                 'start_time' => array('type' => 'datetime', 'not null' => true),
                 'end_time' => array('type' => 'datetime', 'not null' => true),
                 'title' => array('type' => 'varchar',
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
                 'start_time' => array('type' => 'datetime', 'not null' => true),
                 'end_time' => array('type' => 'datetime', 'not null' => true),
                 'title' => array('type' => 'varchar',
-                                 'length' => 255,
+                                 'length' => 191,
                                  'not null' => true),
                 'location' => array('type' => 'varchar',
                                  'not null' => true),
                 'location' => array('type' => 'varchar',
-                                    'length' => 255),
+                                    'length' => 191),
                 'url' => array('type' => 'varchar',
                 'url' => array('type' => 'varchar',
-                               'length' => 255),
+                               'length' => 191),
                 'description' => array('type' => 'text'),
                 'created' => array('type' => 'datetime',
                                    'not null' => true),
                 'description' => array('type' => 'text'),
                 'created' => array('type' => 'datetime',
                                    'not null' => true),
index 7266ea7493aa0ba7a508a8a78ca0e358750aefb0..3e0efc689a6a5dcbab2c9ccf14bf70b31d12fedb 100644 (file)
@@ -50,7 +50,7 @@ class RSVP extends Managed_DataObject
 
     public $__table = 'rsvp'; // table name
     public $id;                // varchar(36) UUID
 
     public $__table = 'rsvp'; // table name
     public $id;                // varchar(36) UUID
-    public $uri;               // varchar(255)
+    public $uri;               // varchar(191)   not 255 because utf8mb4 takes more space
     public $profile_id;        // int
     public $event_id;          // varchar(36) UUID
     public $response;            // tinyint
     public $profile_id;        // int
     public $event_id;          // varchar(36) UUID
     public $response;            // tinyint
@@ -83,7 +83,7 @@ class RSVP extends Managed_DataObject
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'profile_id' => array('type' => 'int'),
                 'event_id' => array('type' => 'char',
                                'not null' => true),
                 'profile_id' => array('type' => 'int'),
                 'event_id' => array('type' => 'char',
index a7cf5a13aa20cac519fe61fd462c6b0d565c9752..1f77bb1b4f117e9b4244ab55827b67a419f5f954 100644 (file)
@@ -52,7 +52,7 @@ class Notice_to_item extends Managed_DataObject
 {
     public $__table = 'notice_to_item'; // table name
     public $notice_id;                  // int(4)  primary_key not_null
 {
     public $__table = 'notice_to_item'; // table name
     public $notice_id;                  // int(4)  primary_key not_null
-    public $item_id;                    // varchar(255) not null
+    public $item_id;                    // varchar(191) not null   not 255 because utf8mb4 takes more space
     public $created;                    // datetime
 
     /**
     public $created;                    // datetime
 
     /**
@@ -76,7 +76,7 @@ class Notice_to_item extends Managed_DataObject
     {
         return array(
             new ColumnDef('notice_id', 'integer', null, false, 'PRI'),
     {
         return array(
             new ColumnDef('notice_id', 'integer', null, false, 'PRI'),
-            new ColumnDef('item_id', 'varchar', 255, false, 'UNI'),
+            new ColumnDef('item_id', 'varchar', 191, false, 'UNI'),
             new ColumnDef('created', 'datetime',  null, false)
         );
     }
             new ColumnDef('created', 'datetime',  null, false)
         );
     }
index 68c36dfaef5b6710ccbf2771f3aa612a498aba5c..094b65feaa94fd19b38f6b5dd12e6af5b48ebd10 100644 (file)
@@ -8,7 +8,7 @@ class Fave extends Managed_DataObject
     public $__table = 'fave';                            // table name
     public $notice_id;                       // int(4)  primary_key not_null
     public $user_id;                         // int(4)  primary_key not_null
     public $__table = 'fave';                            // table name
     public $notice_id;                       // int(4)  primary_key not_null
     public $user_id;                         // int(4)  primary_key not_null
-    public $uri;                             // varchar(255)
+    public $uri;                             // varchar(191)   not 255 because utf8mb4 takes more space   not 255 because utf8mb4 takes more space
     public $created;                         // datetime  multiple_key not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                         // datetime  multiple_key not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -18,7 +18,7 @@ class Fave extends Managed_DataObject
             'fields' => array(
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice that is the favorite'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who likes this notice'),
             'fields' => array(
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice that is the favorite'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who likes this notice'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier, usually a tag URI'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier, usually a tag URI'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index a6e01a8c1b385f1fffdc55b4da3647b8f627efd3..4e4ee69c9739c303a9fc946448304cfbe6fdf077 100644 (file)
@@ -39,10 +39,10 @@ class Photo extends Managed_DataObject
 
     public $__table = 'photo'; // table name
     public $id;                // char (36) // UUID
 
     public $__table = 'photo'; // table name
     public $id;                // char (36) // UUID
-    public $uri;               // varchar (255)  // This is the corresponding notice's uri.
-    public $photo_uri;         // varchar (255)
-    public $thumb_uri;         // varchar (255)
-    public $title;             // varchar (255)
+    public $uri;               // varchar (191)  // This is the corresponding notice's uri.   not 255 because utf8mb4 takes more space
+    public $photo_uri;         // varchar (191)   not 255 because utf8mb4 takes more space
+    public $thumb_uri;         // varchar (191)   not 255 because utf8mb4 takes more space
+    public $title;             // varchar (191)   not 255 because utf8mb4 takes more space
     public $description;       // text
     public $profile_id;        // int
 
     public $description;       // text
     public $profile_id;        // int
 
@@ -66,13 +66,13 @@ class Photo extends Managed_DataObject
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'photo_uri' => array('type' => 'varchar',
                                'not null' => true),
                 'photo_uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'photo_uri' => array('type' => 'varchar',
                                'not null' => true),
                 'photo_uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
             ),
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
             ),
index 4f4e5fbfe44cc415ae66c8410c4686bb93567b2d..5b14e006da40197f69a68f6a08c29b8da12c8af3 100644 (file)
@@ -38,9 +38,9 @@ class GNUsocialPhoto extends Managed_DataObject
     public $id;         // int(11)
     public $notice_id;  // int(11)
     public $album_id;   // int(11)
     public $id;         // int(11)
     public $notice_id;  // int(11)
     public $album_id;   // int(11)
-    public $uri;        // varchar(255)
-    public $thumb_uri;  // varchar(255)
-       public $title;      // varchar(255)
+    public $uri;        // varchar(191)   not 255 because utf8mb4 takes more space
+    public $thumb_uri;  // varchar(191)   not 255 because utf8mb4 takes more space
+       public $title;      // varchar(191)   not 255 because utf8mb4 takes more space
        public $photo_description; // text
     public $created;           // datetime()   not_null
     public $modified;          // timestamp()   not_null default_CURRENT_TIMESTAMP
        public $photo_description; // text
     public $created;           // datetime()   not_null
     public $modified;          // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -63,9 +63,9 @@ class GNUsocialPhoto extends Managed_DataObject
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for Photo'),
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID for the related notice'),
                 'album_id' => array('type' => 'int', 'not null' => true, 'description' => 'The parent album ID'),
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for Photo'),
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID for the related notice'),
                 'album_id' => array('type' => 'int', 'not null' => true, 'description' => 'The parent album ID'),
-                'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'unique address for this photo'),
-                'thumb_uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'unique address for this photo thumbnail'),
-                'title' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'The Photo title'),
+                'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'unique address for this photo'),
+                'thumb_uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'unique address for this photo thumbnail'),
+                'title' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'The Photo title'),
                 'photo_description' => array('type' => 'text', 'not null' => true, 'description' => 'A description for this photo'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'photo_description' => array('type' => 'text', 'not null' => true, 'description' => 'A description for this photo'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index 8b8c1dbf5a03c7b98e813deb0c1fe924b1edbaf2..acf509a22ac0c84dc73e9534e506dac81cd61711 100644 (file)
@@ -38,7 +38,7 @@ class GNUsocialPhotoAlbum extends Managed_DataObject
     public $__table = 'GNUsocialPhotoAlbum';
     public $album_id;          // int(11) -- Unique identifier for the album
     public $profile_id;        // int(11) -- Profile ID for the owner of the album
     public $__table = 'GNUsocialPhotoAlbum';
     public $album_id;          // int(11) -- Unique identifier for the album
     public $profile_id;        // int(11) -- Profile ID for the owner of the album
-    public $album_name;        // varchar(255) -- Title for this album
+    public $album_name;        // varchar(191) -- Title for this album   not 255 because utf8mb4 takes more space
     public $album_description; // text -- A description of the album
     public $created;           // datetime()   not_null
     public $modified;          // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $album_description; // text -- A description of the album
     public $created;           // datetime()   not_null
     public $modified;          // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -50,7 +50,7 @@ class GNUsocialPhotoAlbum extends Managed_DataObject
             'fields' => array(
                 'album_id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique identifier for the album'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'Profile ID for the owner of the album'),
             'fields' => array(
                 'album_id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique identifier for the album'),
                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'Profile ID for the owner of the album'),
-                'album_name' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'Title for this album'),
+                'album_name' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'Title for this album'),
                 'album_description' => array('type' => 'text', 'not null' => true, 'description' => 'A description for this album'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'album_description' => array('type' => 'text', 'not null' => true, 'description' => 'A description for this album'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index 564ddce875e40294de0fad6411fb5f2310c616e0..5a9b8de0cb357cc74fc167e92143d43938c06b3d 100644 (file)
@@ -37,9 +37,9 @@ class GNUsocialProfileExtensionField extends Managed_DataObject
     public $__table = 'gnusocialprofileextensionfield';
     public $id;          // int(11)
     public $systemname;  // varchar(64)
     public $__table = 'gnusocialprofileextensionfield';
     public $id;          // int(11)
     public $systemname;  // varchar(64)
-    public $title;       // varchar(255)
+    public $title;       // varchar(191)   not 255 because utf8mb4 takes more space
     public $description; // text
     public $description; // text
-    public $type;        // varchar(255)
+    public $type;        // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;     // datetime()   not_null
     public $modified;    // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;     // datetime()   not_null
     public $modified;    // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -49,9 +49,9 @@ class GNUsocialProfileExtensionField extends Managed_DataObject
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for extension field'),
                 'systemname' => array('type' => 'varchar', 'not null' => true, 'length' => 64, 'description' => 'field systemname'),
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for extension field'),
                 'systemname' => array('type' => 'varchar', 'not null' => true, 'length' => 64, 'description' => 'field systemname'),
-                'title' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'field title'),
+                'title' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'field title'),
                 'description' => array('type' => 'text', 'not null' => true, 'description' => 'field description'),
                 'description' => array('type' => 'text', 'not null' => true, 'description' => 'field description'),
-                'type' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'field type'),
+                'type' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'field type'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
index d2dd0469a1f6b4d94b0fe64909ccbe20ca1bec46..09c1f6b8443a0ee17ef11d8d8489228aebfc4156 100644 (file)
@@ -39,8 +39,8 @@ class Video extends Managed_DataObject
 
     public $__table = 'video'; // table name
     public $id;                // char (36) // UUID
 
     public $__table = 'video'; // table name
     public $id;                // char (36) // UUID
-    public $uri;               // varchar (255)  // This is the corresponding notice's uri.
-    public $url;               // varchar (255)
+    public $uri;               // varchar (191)   This is the corresponding notice's uri.   not 255 because utf8mb4 takes more space
+    public $url;               // varchar (191)   not 255 because utf8mb4 takes more space
     public $profile_id;        // int
 
     public static function getByNotice($notice)
     public $profile_id;        // int
 
     public static function getByNotice($notice)
@@ -63,10 +63,10 @@ class Video extends Managed_DataObject
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'url' => array('type' => 'varchar',
                                'not null' => true),
                 'url' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
             ),
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
             ),
index 7e825d416deb1fb2c8a628317d63b09c8cdfe465..e4e9f5f6248b848152a7f90f3ea90e785f805a11 100644 (file)
@@ -48,12 +48,12 @@ class Group_message extends Managed_DataObject
 {
     public $__table = 'group_message'; // table name
     public $id;                        // char(36)  primary_key not_null
 {
     public $__table = 'group_message'; // table name
     public $id;                        // char(36)  primary_key not_null
-    public $uri;                       // varchar(255)
+    public $uri;                       // varchar(191)   not 255 because utf8mb4 takes more space
     public $from_profile;              // int
     public $to_group;                  // int
     public $content;
     public $rendered;
     public $from_profile;              // int
     public $to_group;                  // int
     public $content;
     public $rendered;
-    public $url;
+    public $url;                       // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                   // datetime()   not_null
     public $modified;                  // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                   // datetime()   not_null
     public $modified;                  // timestamp()   not_null default_CURRENT_TIMESTAMP
 
@@ -62,8 +62,8 @@ class Group_message extends Managed_DataObject
         return array(
             'fields' => array(
                 'id' => array('type' => 'char', 'not null' => true, 'length' => 36, 'description' => 'message uuid'),
         return array(
             'fields' => array(
                 'id' => array('type' => 'char', 'not null' => true, 'length' => 36, 'description' => 'message uuid'),
-                'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'message uri'),
-                'url' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'representation url'),
+                'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'message uri'),
+                'url' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'representation url'),
                 'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'sending profile ID'),
                 'to_group' => array('type' => 'int', 'not null' => true, 'description' => 'receiving group ID'),
                 'content' => array('type' => 'text', 'not null' => true, 'description' => 'message content'),
                 'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'sending profile ID'),
                 'to_group' => array('type' => 'int', 'not null' => true, 'description' => 'receiving group ID'),
                 'content' => array('type' => 'text', 'not null' => true, 'description' => 'message content'),
index 610e32fca757bcff1ff39f16f3652c4ad66a578d..f88ab700874adfee8bbd847f8eee3aee92242151 100644 (file)
@@ -46,11 +46,11 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
  */
 class Notice_title extends Managed_DataObject
 {
  */
 class Notice_title extends Managed_DataObject
 {
-    const MAXCHARS = 255;
+    const MAXCHARS = 191;   // not 255 because utf8mb4 takes more space
 
     public $__table = 'notice_title'; // table name
     public $notice_id;                         // int(11)  primary_key not_null
 
     public $__table = 'notice_title'; // table name
     public $notice_id;                         // int(11)  primary_key not_null
-    public $title;                             // varchar(255)
+    public $title;                             // varchar(191)   not 255 because utf8mb4 takes more space
     public $created;                           // datetime()   not_null
     public $modified;                          // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public $created;                           // datetime()   not_null
     public $modified;                          // timestamp()   not_null default_CURRENT_TIMESTAMP
 
index adc1aa11be6506eb9041a85db5b1924c53180131..d0ac83b56d754d96946c3c6bdd18c86e553c76ed 100644 (file)
@@ -62,7 +62,7 @@ class FeedSub extends Managed_DataObject
     public $__table = 'feedsub';
 
     public $id;
     public $__table = 'feedsub';
 
     public $id;
-    public $uri;
+    public $uri;    // varchar(191)   not 255 because utf8mb4 takes more space
 
     // PuSH subscription data
     public $huburi;
 
     // PuSH subscription data
     public $huburi;
@@ -80,7 +80,7 @@ class FeedSub extends Managed_DataObject
         return array(
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'FeedSub local unique id'),
         return array(
             'fields' => array(
                 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'FeedSub local unique id'),
-                'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'FeedSub uri'),
+                'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'FeedSub uri'),
                 'huburi' => array('type' => 'text', 'description' => 'FeedSub hub-uri'),
                 'secret' => array('type' => 'text', 'description' => 'FeedSub stored secret'),
                 'sub_state' => array('type' => 'enum("subscribe","active","unsubscribe","inactive","nohub")', 'not null' => true, 'description' => 'subscription state'),
                 'huburi' => array('type' => 'text', 'description' => 'FeedSub hub-uri'),
                 'secret' => array('type' => 'text', 'description' => 'FeedSub stored secret'),
                 'sub_state' => array('type' => 'enum("subscribe","active","unsubscribe","inactive","nohub")', 'not null' => true, 'description' => 'subscription state'),
index 96c6986cdf7923b7446e25b43f98179baeec2831..c9d65c56a7a45b09a6beff359f1d2753207eeb23 100644 (file)
@@ -31,8 +31,8 @@ class HubSub extends Managed_DataObject
     public $__table = 'hubsub';
 
     public $hashkey; // sha1(topic . '|' . $callback); (topic, callback) key is too long for myisam in utf8
     public $__table = 'hubsub';
 
     public $hashkey; // sha1(topic . '|' . $callback); (topic, callback) key is too long for myisam in utf8
-    public $topic;
-    public $callback;
+    public $topic;      // varchar(191)   not 255 because utf8mb4 takes more space
+    public $callback;   // varchar(191)   not 255 because utf8mb4 takes more space
     public $secret;
     public $lease;
     public $sub_start;
     public $secret;
     public $lease;
     public $sub_start;
@@ -55,8 +55,8 @@ class HubSub extends Managed_DataObject
         return array(
             'fields' => array(
                 'hashkey' => array('type' => 'char', 'not null' => true, 'length' => 40, 'description' => 'HubSub hashkey'),
         return array(
             'fields' => array(
                 'hashkey' => array('type' => 'char', 'not null' => true, 'length' => 40, 'description' => 'HubSub hashkey'),
-                'topic' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'HubSub topic'),
-                'callback' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'HubSub callback'),
+                'topic' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'HubSub topic'),
+                'callback' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'HubSub callback'),
                 'secret' => array('type' => 'text', 'description' => 'HubSub stored secret'),
                 'lease' => array('type' => 'int', 'description' => 'HubSub leasetime'),
                 'sub_start' => array('type' => 'datetime', 'description' => 'subscription start'),
                 'secret' => array('type' => 'text', 'description' => 'HubSub stored secret'),
                 'lease' => array('type' => 'int', 'description' => 'HubSub leasetime'),
                 'sub_start' => array('type' => 'datetime', 'description' => 'subscription start'),
index 79098c64048ed31705b54ecfb94259619dad826d..959aeef6bd95318fe8c3425485f329aeccd67eef 100644 (file)
@@ -51,12 +51,12 @@ class Ostatus_profile extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'not null' => true),
                 'profile_id' => array('type' => 'integer'),
                 'group_id' => array('type' => 'integer'),
                 'peopletag_id' => array('type' => 'integer'),
                 'profile_id' => array('type' => 'integer'),
                 'group_id' => array('type' => 'integer'),
                 'peopletag_id' => array('type' => 'integer'),
-                'feeduri' => array('type' => 'varchar', 'length' => 255),
-                'salmonuri' => array('type' => 'varchar', 'length' => 255),
+                'feeduri' => array('type' => 'varchar', 'length' => 191),
+                'salmonuri' => array('type' => 'varchar', 'length' => 191),
                 'avatar' => array('type' => 'text'),
                 'created' => array('type' => 'datetime', 'not null' => true),
                 'modified' => array('type' => 'datetime', 'not null' => true),
                 'avatar' => array('type' => 'text'),
                 'created' => array('type' => 'datetime', 'not null' => true),
                 'modified' => array('type' => 'datetime', 'not null' => true),
@@ -1806,8 +1806,8 @@ class Ostatus_profile extends Managed_DataObject
         }
 
         if (!empty($location)) {
         }
 
         if (!empty($location)) {
-            if (mb_strlen($location) > 255) {
-                $location = mb_substr($note, 0, 255 - 3) . ' â€¦ ';
+            if (mb_strlen($location) > 191) {   // not 255 because utf8mb4 takes more space
+                $location = mb_substr($note, 0, 191 - 3) . ' â€¦ ';
             }
         }
 
             }
         }
 
index 6cecc323e0986e8247a9b218598b8c857f443ba8..88a6a58383577c8bc11af34801bca4c82aee5f4d 100644 (file)
@@ -40,7 +40,7 @@ class Ostatus_source extends Managed_DataObject
         return array(
             'fields' => array(
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID relation'),
         return array(
             'fields' => array(
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID relation'),
-                'profile_uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'Profile URI'),
+                'profile_uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'Profile URI'),
                 'method' => array('type' => 'enum("push","salmon")', 'not null' => true, 'description' => 'source method'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'method' => array('type' => 'enum("push","salmon")', 'not null' => true, 'description' => 'source method'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index fda16368376257e57d0ad75b20ea51e4b48c3cdf..3fc655e1705dbd0dca2c9cf4d2a6851e257a18ff 100644 (file)
@@ -31,14 +31,14 @@ class File_oembed extends Managed_DataObject
     public $type;                            // varchar(20)
     public $mimetype;                        // varchar(50)
     public $provider;                        // varchar(50)
     public $type;                            // varchar(20)
     public $mimetype;                        // varchar(50)
     public $provider;                        // varchar(50)
-    public $provider_url;                    // varchar(255)
+    public $provider_url;                    // varchar(191)   not 255 because utf8mb4 takes more space
     public $width;                           // int(4)
     public $height;                          // int(4)
     public $html;                            // text()
     public $width;                           // int(4)
     public $height;                          // int(4)
     public $html;                            // text()
-    public $title;                           // varchar(255)
+    public $title;                           // varchar(191)   not 255 because utf8mb4 takes more space
     public $author_name;                     // varchar(50)
     public $author_name;                     // varchar(50)
-    public $author_url;                      // varchar(255)
-    public $url;                             // varchar(255)
+    public $author_url;                      // varchar(191)   not 255 because utf8mb4 takes more space
+    public $url;                             // varchar(191)   not 255 because utf8mb4 takes more space
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public static function schemaDef()
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
 
     public static function schemaDef()
@@ -50,14 +50,14 @@ class File_oembed extends Managed_DataObject
                 'type' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed type: photo, video, link, rich'),
                 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
                 'provider' => array('type' => 'varchar', 'length' => 50, 'description' => 'name of this oEmbed provider'),
                 'type' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed type: photo, video, link, rich'),
                 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
                 'provider' => array('type' => 'varchar', 'length' => 50, 'description' => 'name of this oEmbed provider'),
-                'provider_url' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL of this oEmbed provider'),
+                'provider_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL of this oEmbed provider'),
                 'width' => array('type' => 'int', 'description' => 'width of oEmbed resource when available'),
                 'height' => array('type' => 'int', 'description' => 'height of oEmbed resource when available'),
                 'html' => array('type' => 'text', 'description' => 'html representation of this oEmbed resource when applicable'),
                 'width' => array('type' => 'int', 'description' => 'width of oEmbed resource when available'),
                 'height' => array('type' => 'int', 'description' => 'height of oEmbed resource when available'),
                 'html' => array('type' => 'text', 'description' => 'html representation of this oEmbed resource when applicable'),
-                'title' => array('type' => 'varchar', 'length' => 255, 'description' => 'title of oEmbed resource when available'),
+                'title' => array('type' => 'varchar', 'length' => 191, 'description' => 'title of oEmbed resource when available'),
                 'author_name' => array('type' => 'varchar', 'length' => 50, 'description' => 'author name for this oEmbed resource'),
                 'author_name' => array('type' => 'varchar', 'length' => 50, 'description' => 'author name for this oEmbed resource'),
-                'author_url' => array('type' => 'varchar', 'length' => 255, 'description' => 'author URL for this oEmbed resource'),
-                'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL for this oEmbed resource when applicable (photo, link)'),
+                'author_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'author URL for this oEmbed resource'),
+                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL for this oEmbed resource when applicable (photo, link)'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
             'primary key' => array('file_id'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
             'primary key' => array('file_id'),
index baff5cd7f96ce8ee24a30c12d2d1cb8f33964d8f..7e53d8ec959893f1dd80ac5724f91175d0765e29 100644 (file)
@@ -13,8 +13,8 @@ class User_openid extends Managed_DataObject
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'user_openid';                     // table name
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'user_openid';                     // table name
-    public $canonical;                       // varchar(255)  primary_key not_null
-    public $display;                         // varchar(255)  unique_key not_null
+    public $canonical;                       // varchar(191)  primary_key not_null
+    public $display;                         // varchar(191)  unique_key not_null
     public $user_id;                         // int(4)   not_null
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $user_id;                         // int(4)   not_null
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -26,8 +26,8 @@ class User_openid extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'canonical' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'OpenID canonical string'),
-                'display' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'OpenID display string'),
+                'canonical' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'OpenID canonical string'),
+                'display' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'OpenID display string'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'User ID for OpenID owner'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'User ID for OpenID owner'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index ec09e179e439d3a2704bf70fc82e73ceb7b6933c..575854c332f8eb185ebc02eec77925657e6d3ac3 100644 (file)
@@ -13,7 +13,7 @@ class User_openid_trustroot extends Managed_DataObject
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'user_openid_trustroot';                     // table name
     /* the code below is auto generated do not remove the above tag */
 
     public $__table = 'user_openid_trustroot';                     // table name
-    public $trustroot;                         // varchar(255) primary_key not_null
+    public $trustroot;                         // varchar(191) primary_key not_null   not 255 because utf8mb4 takes more space
     public $user_id;                         // int(4)  primary_key not_null
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $user_id;                         // int(4)  primary_key not_null
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -25,7 +25,7 @@ class User_openid_trustroot extends Managed_DataObject
     {
         return array(
             'fields' => array(
     {
         return array(
             'fields' => array(
-                'trustroot' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'OpenID trustroot string'),
+                'trustroot' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'OpenID trustroot string'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'User ID for OpenID trustroot owner'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'User ID for OpenID trustroot owner'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
index fe51c667d510f8415af47b0f31cd7877a96b2125..59161704a9dd1def3e7c8d88323bd98fbce636ed 100644 (file)
@@ -47,7 +47,7 @@ class Poll extends Managed_DataObject
 {
     public $__table = 'poll'; // table name
     public $id;          // char(36) primary key not null -> UUID
 {
     public $__table = 'poll'; // table name
     public $id;          // char(36) primary key not null -> UUID
-    public $uri;
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $profile_id;  // int -> profile.id
     public $question;    // text
     public $options;     // text; newline(?)-delimited
     public $profile_id;  // int -> profile.id
     public $question;    // text
     public $options;     // text; newline(?)-delimited
@@ -62,7 +62,7 @@ class Poll extends Managed_DataObject
             'description' => 'Per-notice poll data for Poll plugin',
             'fields' => array(
                 'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID'),
             'description' => 'Per-notice poll data for Poll plugin',
             'fields' => array(
                 'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'not null' => true),
                 'profile_id' => array('type' => 'int'),
                 'question' => array('type' => 'text'),
                 'options' => array('type' => 'text'),
                 'profile_id' => array('type' => 'int'),
                 'question' => array('type' => 'text'),
                 'options' => array('type' => 'text'),
index 20b7700147bc1006c2a89200b0c2488ed71f5e40..78aec7ea0513c5818c6c0b570522edd1464a7805 100644 (file)
@@ -46,7 +46,7 @@ class Poll_response extends Managed_DataObject
 {
     public $__table = 'poll_response'; // table name
     public $id;          // char(36) primary key not null -> UUID
 {
     public $__table = 'poll_response'; // table name
     public $id;          // char(36) primary key not null -> UUID
-    public $uri;          // varchar(255)
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $poll_id;     // char(36) -> poll.id UUID
     public $profile_id;  // int -> profile.id
     public $selection;   // int -> choice #
     public $poll_id;     // char(36) -> poll.id UUID
     public $profile_id;  // int -> profile.id
     public $selection;   // int -> choice #
@@ -61,7 +61,7 @@ class Poll_response extends Managed_DataObject
             'description' => 'Record of responses to polls',
             'fields' => array(
                 'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID of the response'),
             'description' => 'Record of responses to polls',
             'fields' => array(
                 'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID of the response'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'UUID to the response notice'),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'UUID to the response notice'),
                 'poll_id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID of poll being responded to'),
                 'profile_id' => array('type' => 'int'),
                 'selection' => array('type' => 'int'),
                 'poll_id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID of poll being responded to'),
                 'profile_id' => array('type' => 'int'),
                 'selection' => array('type' => 'int'),
index f4bf7a9d412ee7c21e072d69b71a00cb4fc372fe..2aa69cf5a301aab87e845402d7647cf8e040e804 100644 (file)
@@ -48,7 +48,7 @@ class QnA_Answer extends Managed_DataObject
 
     public $__table = 'qna_answer'; // table name
     public $id;          // char(36) primary key not null -> UUID
 
     public $__table = 'qna_answer'; // table name
     public $id;          // char(36) primary key not null -> UUID
-    public $uri;         // varchar(255)
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $question_id; // char(36) -> question.id UUID
     public $profile_id;  // int -> question.id
     public $best;        // (boolean) int -> whether the question asker has marked this as the best answer
     public $question_id; // char(36) -> question.id UUID
     public $profile_id;  // int -> question.id
     public $best;        // (boolean) int -> whether the question asker has marked this as the best answer
@@ -71,7 +71,7 @@ class QnA_Answer extends Managed_DataObject
                 ),
                 'uri'      => array(
                     'type'        => 'varchar',
                 ),
                 'uri'      => array(
                     'type'        => 'varchar',
-                    'length'      => 255,
+                    'length'      => 191,
                     'not null'    => true,
                     'description' => 'UUID to the answer notice',
                 ),
                     'not null'    => true,
                     'description' => 'UUID to the answer notice',
                 ),
index b421b0aed19a952c98ea5a69ff2762e84afe944d..b5318386777b50dcd2569007bde40303565fa7ad 100644 (file)
@@ -48,7 +48,7 @@ class QnA_Question extends Managed_DataObject
 
     public $__table = 'qna_question'; // table name
     public $id;          // char(36) primary key not null -> UUID
 
     public $__table = 'qna_question'; // table name
     public $id;          // char(36) primary key not null -> UUID
-    public $uri;
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $profile_id;  // int -> profile.id
     public $title;       // text
     public $description; // text
     public $profile_id;  // int -> profile.id
     public $title;       // text
     public $description; // text
@@ -71,7 +71,7 @@ class QnA_Question extends Managed_DataObject
                 ),
                 'uri' => array(
                     'type'     => 'varchar',
                 ),
                 'uri' => array(
                     'type'     => 'varchar',
-                    'length'   => 255,
+                    'length'   => 191,
                     'not null' => true
                 ),
                 'profile_id'  => array('type' => 'int'),
                     'not null' => true
                 ),
                 'profile_id'  => array('type' => 'int'),
index 5d6f0ff99afc75272168bfcd536a05852a1417a4..7541593433f905c9209bf9aaf2f2eb203585c8c2 100644 (file)
@@ -53,9 +53,9 @@ class Realtime_channel extends Managed_DataObject
     public $__table = 'realtime_channel'; // table name
 
     public $user_id;       // int -> user.id, can be null
     public $__table = 'realtime_channel'; // table name
 
     public $user_id;       // int -> user.id, can be null
-    public $action;        // string
-    public $arg1;          // argument
-    public $arg2;          // argument, usually null
+    public $action;        // varchar(191)                  not 255 because utf8mb4 takes more space
+    public $arg1;          // varchar(191)   argument       not 255 because utf8mb4 takes more space
+    public $arg2;          // varchar(191)   usually null   not 255 because utf8mb4 takes more space
     public $channel_key;   // 128-bit shared secret key
     public $audience;      // listener count
     public $created;       // created date
     public $channel_key;   // 128-bit shared secret key
     public $audience;      // listener count
     public $created;       // created date
@@ -73,15 +73,15 @@ class Realtime_channel extends Managed_DataObject
                                    'not null' => false,
                                    'description' => 'user viewing page; can be null'),
                 'action' => array('type' => 'varchar',
                                    'not null' => false,
                                    'description' => 'user viewing page; can be null'),
                 'action' => array('type' => 'varchar',
-                                  'length' => 255,
+                                  'length' => 191,
                                   'not null' => true,
                                   'description' => 'page being viewed'),
                 'arg1' => array('type' => 'varchar',
                                   'not null' => true,
                                   'description' => 'page being viewed'),
                 'arg1' => array('type' => 'varchar',
-                                'length' => 255,
+                                'length' => 191,
                                 'not null' => false,
                                 'description' => 'page argument, like username or tag'),
                 'arg2' => array('type' => 'varchar',
                                 'not null' => false,
                                 'description' => 'page argument, like username or tag'),
                 'arg2' => array('type' => 'varchar',
-                                'length' => 255,
+                                'length' => 191,
                                 'not null' => false,
                                 'description' => 'second page argument, like tag for showstream'),
                 'channel_key' => array('type' => 'varchar',
                                 'not null' => false,
                                 'description' => 'second page argument, like tag for showstream'),
                 'channel_key' => array('type' => 'varchar',
index 9a20536147e3da8be62e0164e6f59808f5c2de8b..28f60b9b3e8db8b11fe447c15c5ef2288c8ed1ed 100644 (file)
@@ -52,7 +52,7 @@ class Twitter_synch_status extends Managed_DataObject
 {
     public $__table = 'twitter_synch_status'; // table name
     public $foreign_id;                      // bigint primary_key not_null
 {
     public $__table = 'twitter_synch_status'; // table name
     public $foreign_id;                      // bigint primary_key not_null
-    public $timeline;                        // varchar(255)  primary_key not_null
+    public $timeline;                        // varchar(191)  primary_key not_null   not 255 because utf8mb4 takes more space
     public $last_id;                         // bigint not_null
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
     public $last_id;                         // bigint not_null
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
@@ -62,7 +62,7 @@ class Twitter_synch_status extends Managed_DataObject
         return array(
             'fields' => array(
                 'foreign_id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'Foreign message ID'),
         return array(
             'fields' => array(
                 'foreign_id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'Foreign message ID'),
-                'timeline' => array('type' => 'varchar', 'length' => 255, 'description' => 'timeline name'),
+                'timeline' => array('type' => 'varchar', 'length' => 191, 'description' => 'timeline name'),
                 'last_id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'last id fetched'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
                 'last_id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'last id fetched'),
                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),