Merge branch 'utf8mb4' into nightly

Conflicts because of urlhash fixes:
	classes/File.php
	classes/File_redirection.php
	classes/File_thumbnail.php
This commit is contained in:
Mikael Nordfeldth 2015-02-19 20:50:40 +01:00
commit 0590f2975e
67 changed files with 278 additions and 271 deletions

View File

@ -22,7 +22,7 @@ class Attention extends Managed_DataObject
public $__table = 'attention'; // table name public $__table = 'attention'; // table name
public $notice_id; // int(4) primary_key not_null public $notice_id; // int(4) primary_key not_null
public $profile_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 $created; // datetime() not_null
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
@ -33,7 +33,7 @@ class Attention extends Managed_DataObject
'fields' => array( 'fields' => array(
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice_id to give attention'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -15,8 +15,8 @@ class Avatar extends Managed_DataObject
public $width; // int(4) primary_key not_null public $width; // int(4) primary_key not_null
public $height; // int(4) primary_key not_null public $height; // int(4) primary_key not_null
public $mediatype; // varchar(32) not_null public $mediatype; // varchar(32) not_null
public $filename; // varchar(255) public $filename; // varchar(191) not 255 because utf8mb4 takes more space
public $url; // varchar(255) unique_key public $url; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP 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'), 'width' => array('type' => 'int', 'not null' => true, 'description' => 'image width'),
'height' => array('type' => 'int', 'not null' => true, 'description' => 'image height'), 'height' => array('type' => 'int', 'not null' => true, 'description' => 'image height'),
'mediatype' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'file type'), 'mediatype' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'file type'),
'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'local filename, if local'), 'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'local filename, if local'),
'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'avatar location'), 'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'avatar location'),
'created' => array('type' => 'datetime', '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -35,7 +35,7 @@ class Config extends Managed_DataObject
public $__table = 'config'; // table name public $__table = 'config'; // table name
public $section; // varchar(32) primary_key not_null public $section; // varchar(32) primary_key not_null
public $setting; // 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 */ /* the code above is auto generated do not remove the tag below */
###END_AUTOCODE ###END_AUTOCODE
@ -46,7 +46,7 @@ class Config extends Managed_DataObject
'fields' => array( 'fields' => array(
'section' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'default' => '', 'description' => 'configuration section'), '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'), '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'),
); );

View File

@ -12,8 +12,8 @@ class Confirm_address extends Managed_DataObject
public $__table = 'confirm_address'; // table name public $__table = 'confirm_address'; // table name
public $code; // varchar(32) primary_key not_null public $code; // varchar(32) primary_key not_null
public $user_id; // int(4) not_null public $user_id; // int(4) not_null
public $address; // varchar(255) not_null public $address; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $address_extra; // varchar(255) not_null public $address_extra; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $address_type; // varchar(8) not_null public $address_type; // varchar(8) not_null
public $claimed; // datetime() public $claimed; // datetime()
public $sent; // datetime() public $sent; // datetime()
@ -28,8 +28,8 @@ class Confirm_address extends Managed_DataObject
'fields' => array( 'fields' => array(
'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'), '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'), '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' => array('type' => 'varchar', 'length' => 191, '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_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")'), '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'), 'claimed' => array('type' => 'datetime', 'description' => 'date this was claimed for queueing'),
'sent' => array('type' => 'datetime', 'description' => 'date this was sent for queueing'), 'sent' => array('type' => 'datetime', 'description' => 'date this was sent for queueing'),

View File

@ -10,8 +10,8 @@ class Consumer extends Managed_DataObject
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
public $__table = 'consumer'; // table name public $__table = 'consumer'; // 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 $consumer_secret; // varchar(255) not_null public $consumer_secret; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $seed; // char(32) not_null public $seed; // char(32) not_null
public $created; // datetime not_null public $created; // datetime not_null
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
@ -24,8 +24,8 @@ class Consumer extends Managed_DataObject
return array( return array(
'description' => 'OAuth consumer record', 'description' => 'OAuth consumer record',
'fields' => array( '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'),
'consumer_secret' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'secret value'), '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'), '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'), 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),

View File

@ -35,7 +35,7 @@ class Conversation extends Managed_DataObject
{ {
public $__table = 'conversation'; // table name public $__table = 'conversation'; // table name
public $id; // int(4) primary_key not_null 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 $created; // datetime not_null
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
@ -44,7 +44,7 @@ class Conversation extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'not null' => true, 'description' => 'should be set from root notice id (since 2014-03-01 commit)'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -34,7 +34,7 @@ class Deleted_notice extends Managed_DataObject
public $__table = 'deleted_notice'; // table name public $__table = 'deleted_notice'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $profile_id; // int(4) 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 $created; // datetime() not_null
public $deleted; // datetime() not_null public $deleted; // datetime() not_null
@ -47,7 +47,7 @@ class Deleted_notice extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity of notice'), 'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity of notice'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'author of the 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'), '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'), 'deleted' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
), ),

View File

@ -30,10 +30,10 @@ class File extends Managed_DataObject
public $url; // text public $url; // text
public $mimetype; // varchar(50) public $mimetype; // varchar(50)
public $size; // int(4) public $size; // int(4)
public $title; // varchar(255) public $title; // varchar(191) not 255 because utf8mb4 takes more space
public $date; // int(4) public $date; // int(4)
public $protected; // 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 $width; // int(4)
public $height; // int(4) public $height; // int(4)
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -49,10 +49,10 @@ class File extends Managed_DataObject
'url' => array('type' => 'text', 'description' => 'destination URL after following redirections'), 'url' => array('type' => 'text', 'description' => 'destination URL after following redirections'),
'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'), 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
'size' => array('type' => 'int', 'description' => 'size of resource when available'), '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'), 'date' => array('type' => 'int', 'description' => 'date of resource according to http query'),
'protected' => array('type' => 'int', 'description' => 'true when URL is private (needs login)'), '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'), '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'), 'height' => array('type' => 'int', 'description' => 'height in pixels, if it can be described as such and data is available'),

View File

@ -28,7 +28,7 @@ class File_thumbnail extends Managed_DataObject
public $__table = 'file_thumbnail'; // table name public $__table = 'file_thumbnail'; // table name
public $file_id; // int(4) primary_key not_null public $file_id; // int(4) primary_key not_null
public $url; // text public $url; // text
public $filename; // varchar(255) public $filename; // varchar(191) not 255 because utf8mb4 takes more space
public $width; // int(4) primary_key public $width; // int(4) primary_key
public $height; // int(4) primary_key public $height; // int(4) primary_key
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -39,7 +39,7 @@ class File_thumbnail extends Managed_DataObject
'fields' => array( 'fields' => array(
'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'thumbnail for what URL/file'), 'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'thumbnail for what URL/file'),
'url' => array('type' => 'text', 'description' => 'URL of thumbnail'), 'url' => array('type' => 'text', 'description' => 'URL of thumbnail'),
'filename' => array('type' => 'varchar', 'length' => 255, 'description' => 'if stored locally, filename is put here'), 'filename' => array('type' => 'varchar', 'length' => 191, 'description' => 'if stored locally, filename is put here'),
'width' => array('type' => 'int', 'description' => 'width of thumbnail'), 'width' => array('type' => 'int', 'description' => 'width of thumbnail'),
'height' => array('type' => 'int', 'description' => 'height of thumbnail'), 'height' => array('type' => 'int', 'description' => 'height of thumbnail'),
'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -13,7 +13,7 @@ class Foreign_link extends Managed_DataObject
public $user_id; // 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 $foreign_id; // bigint(8) primary_key not_null unsigned
public $service; // int(4) primary_key not_null 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 $noticesync; // tinyint(1) not_null default_1
public $friendsync; // tinyint(1) not_null default_2 public $friendsync; // tinyint(1) not_null default_2
public $profilesync; // tinyint(1) not_null default_1 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'), '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'), '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'), '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'), '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'), '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'), 'profilesync' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming'),

View File

@ -12,7 +12,7 @@ class Foreign_service extends Managed_DataObject
public $__table = 'foreign_service'; // table name public $__table = 'foreign_service'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $name; // varchar(32) unique_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 $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -25,7 +25,7 @@ class Foreign_service extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'not null' => true, 'description' => 'numeric key for service'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -12,8 +12,8 @@ class Foreign_user extends Managed_DataObject
public $__table = 'foreign_user'; // table name public $__table = 'foreign_user'; // table name
public $id; // bigint(8) primary_key not_null public $id; // bigint(8) primary_key not_null
public $service; // int(4) primary_key not_null public $service; // int(4) primary_key not_null
public $uri; // varchar(255) unique_key not_null public $uri; // varchar(191) unique_key not_null not 255 because utf8mb4 takes more space
public $nickname; // varchar(255) public $nickname; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -26,8 +26,8 @@ class Foreign_user extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'unique numeric key on foreign service'), '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'), 'service' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to service'),
'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'identifying URI'), 'uri' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'identifying URI'),
'nickname' => array('type' => 'varchar', 'length' => 255, 'description' => 'nickname on foreign service'), 'nickname' => array('type' => 'varchar', 'length' => 191, 'description' => 'nickname on foreign service'),
'created' => array('type' => 'datetime', '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -12,7 +12,7 @@ class Group_member extends Managed_DataObject
public $group_id; // int(4) primary_key not_null public $group_id; // int(4) primary_key not_null
public $profile_id; // int(4) primary_key not_null public $profile_id; // int(4) primary_key not_null
public $is_admin; // tinyint(1) 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 $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP 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'), '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'), '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?'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -12,7 +12,7 @@ class Invitation extends Managed_DataObject
public $__table = 'invitation'; // table name public $__table = 'invitation'; // table name
public $code; // varchar(32) primary_key not_null public $code; // varchar(32) primary_key not_null
public $user_id; // int(4) 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 $address_type; // varchar(8) multiple_key not_null
public $registered_user_id; // int(4) not_null public $registered_user_id; // int(4) not_null
public $created; // datetime() not_null public $created; // datetime() not_null
@ -34,7 +34,7 @@ class Invitation extends Managed_DataObject
'fields' => array( 'fields' => array(
'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'random code for an invitation'), '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'), '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")'), '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'), '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'), 'registered_user_id' => array('type' => 'int', 'not null' => false, 'description' => 'if the invitation is converted, who the new user is'),

View File

@ -32,7 +32,7 @@ class Location_namespace extends Managed_DataObject
public $__table = 'location_namespace'; // table name public $__table = 'location_namespace'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $description; // varchar(255) public $description; // varchar(191)
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -44,7 +44,7 @@ class Location_namespace extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity for this namespace'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View 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 // each connection
function _connect() function _connect()
@ -784,9 +784,9 @@ class Memcached_DataObject extends Safe_DataObject
$conn = $DB->connection; $conn = $DB->connection;
if (!empty($conn)) { if (!empty($conn)) {
if ($DB instanceof DB_mysqli || $DB instanceof MDB2_Driver_mysqli) { 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);
} }
} }
} }

View File

@ -10,7 +10,7 @@ class Nonce extends Managed_DataObject
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
public $__table = 'nonce'; // table name 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 $tok; // char(32)
public $nonce; // char(32) primary_key not_null public $nonce; // char(32) primary_key not_null
public $ts; // datetime() primary_key not_null public $ts; // datetime() primary_key not_null
@ -39,7 +39,7 @@ class Nonce extends Managed_DataObject
return array( return array(
'description' => 'OAuth nonce record', 'description' => 'OAuth nonce record',
'fields' => array( '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'), 'tok' => array('type' => 'char', 'length' => 32, 'description' => 'buggy old value, ignored'),
'nonce' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'nonce'), 'nonce' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'nonce'),
'ts' => array('type' => 'datetime', 'not null' => true, 'description' => 'timestamp sent'), 'ts' => array('type' => 'datetime', 'not null' => true, 'description' => 'timestamp sent'),

View File

@ -55,10 +55,10 @@ class Notice extends Managed_DataObject
public $__table = 'notice'; // table name public $__table = 'notice'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $profile_id; // int(4) multiple_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 $content; // text
public $rendered; // 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 $created; // datetime multiple_key not_null default_0000-00-00%2000%3A00%3A00
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
public $reply_to; // int(4) public $reply_to; // int(4)
@ -70,8 +70,8 @@ class Notice extends Managed_DataObject
public $location_id; // int(4) public $location_id; // int(4)
public $location_ns; // int(4) public $location_ns; // int(4)
public $repeat_of; // int(4) public $repeat_of; // int(4)
public $verb; // varchar(255) public $verb; // varchar(191) not 255 because utf8mb4 takes more space
public $object_type; // varchar(255) public $object_type; // varchar(191) not 255 because utf8mb4 takes more space
public $scope; // int(4) public $scope; // int(4)
/* the code above is auto generated do not remove the tag below */ /* the code above is auto generated do not remove the tag below */
@ -83,10 +83,10 @@ class Notice extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'who made the update'), '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'), 'content' => array('type' => 'text', 'description' => 'update content', 'collate' => 'utf8_general_ci'),
'rendered' => array('type' => 'text', 'description' => 'HTML version of the 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'), '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'), '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)'), '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_id' => array('type' => 'int', 'description' => 'location id if possible'),
'location_ns' => array('type' => 'int', 'description' => 'namespace for location'), 'location_ns' => array('type' => 'int', 'description' => 'namespace for location'),
'repeat_of' => array('type' => 'int', 'description' => 'notice this is a repeat of'), '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'), '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' => 255, 'description' => 'URI representing activity streams verb', 'default' => 'http://activitystrea.ms/schema/1.0/post'), 'verb' => array('type' => 'varchar', 'length' => 191, 'description' => 'URI representing activity streams verb', 'default' => 'http://activitystrea.ms/schema/1.0/post'),
'scope' => array('type' => 'int', 'scope' => array('type' => 'int',
'description' => 'bit map for distribution scope; 0 = everywhere; 1 = this server only; 2 = addressees; 4 = followers; null = default'), 'description' => 'bit map for distribution scope; 0 = everywhere; 1 = this server only; 2 = addressees; 4 = followers; null = default'),
), ),

View File

@ -11,8 +11,8 @@ class Notice_source extends Managed_DataObject
public $__table = 'notice_source'; // table name public $__table = 'notice_source'; // table name
public $code; // varchar(32) primary_key not_null public $code; // varchar(32) primary_key not_null
public $name; // varchar(255) not_null public $name; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $url; // varchar(255) not_null public $url; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -24,8 +24,8 @@ class Notice_source extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'source code'), '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'), 'name' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'name of the source'),
'url' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'url to link to'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -12,14 +12,14 @@ class Oauth_application extends Managed_DataObject
public $__table = 'oauth_application'; // table name public $__table = 'oauth_application'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $owner; // int(4) not_null public $owner; // int(4) not_null
public $consumer_key; // varchar(255) not_null public $consumer_key; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $name; // varchar(255) not_null public $name; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $description; // varchar(255) public $description; // varchar(191) not 255 because utf8mb4 takes more space
public $icon; // varchar(255) not_null public $icon; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $source_url; // varchar(255) public $source_url; // varchar(191) not 255 because utf8mb4 takes more space
public $organization; // varchar(255) public $organization; // varchar(191) not 255 because utf8mb4 takes more space
public $homepage; // varchar(255) public $homepage; // varchar(191) not 255 because utf8mb4 takes more space
public $callback_url; // varchar(255) not_null public $callback_url; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $type; // tinyint(1) public $type; // tinyint(1)
public $access_type; // tinyint(1) public $access_type; // tinyint(1)
public $created; // datetime not_null public $created; // datetime not_null
@ -43,12 +43,12 @@ class Oauth_application extends Managed_DataObject
static function maxDesc() static function maxDesc()
{ {
// This used to default to textlimit or allow unlimited descriptions, // 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 // but this isn't part of a notice and the field's limited to 191 chars
// in the DB, so those seem silly. // 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')); $desclimit = intval(common_config('application', 'desclimit'));
if ($desclimit > 0 && $desclimit < $max) { if ($desclimit > 0 && $desclimit < $max) {
return $desclimit; return $desclimit;
@ -163,14 +163,14 @@ class Oauth_application extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'),
'owner' => array('type' => 'int', 'not null' => true, 'description' => 'owner of the application'), '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'), 'consumer_key' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'application consumer key'),
'name' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'name of the application'), 'name' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'name of the application'),
'description' => array('type' => 'varchar', 'length' => 255, 'description' => 'description of the application'), 'description' => array('type' => 'varchar', 'length' => 191, 'description' => 'description of the application'),
'icon' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'application icon'), 'icon' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'application icon'),
'source_url' => array('type' => 'varchar', 'length' => 255, 'description' => 'application homepage - used for source link'), 'source_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'application homepage - used for source link'),
'organization' => array('type' => 'varchar', 'length' => 255, 'description' => 'name of the organization running the application'), 'organization' => array('type' => 'varchar', 'length' => 191, 'description' => 'name of the organization running the application'),
'homepage' => array('type' => 'varchar', 'length' => 255, 'description' => 'homepage for the organization'), 'homepage' => array('type' => 'varchar', 'length' => 191, 'description' => 'homepage for the organization'),
'callback_url' => array('type' => 'varchar', 'length' => 255, 'description' => 'url to redirect to after authentication'), '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'), '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'), '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'), 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),

View File

@ -13,7 +13,7 @@ class Oauth_application_user extends Managed_DataObject
public $profile_id; // int(4) primary_key not_null public $profile_id; // int(4) primary_key not_null
public $application_id; // int(4) primary_key not_null public $application_id; // int(4) primary_key not_null
public $access_type; // tinyint(1) 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 $created; // datetime not_null
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP 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'), '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'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -12,7 +12,7 @@ class Oauth_token_association extends Managed_DataObject
public $__table = 'oauth_token_association'; // table name public $__table = 'oauth_token_association'; // table name
public $profile_id; // int(4) primary_key not_null public $profile_id; // int(4) primary_key not_null
public $application_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 $created; // datetime not_null
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
@ -43,7 +43,7 @@ class Oauth_token_association extends Managed_DataObject
'fields' => array( 'fields' => array(
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'associated user'), 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'associated user'),
'application_id' => array('type' => 'int', 'not null' => true, 'description' => 'the application'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -30,11 +30,11 @@ class Profile extends Managed_DataObject
public $__table = 'profile'; // table name public $__table = 'profile'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $nickname; // varchar(64) multiple_key not_null public $nickname; // varchar(64) multiple_key not_null
public $fullname; // varchar(255) multiple_key public $fullname; // varchar(191) multiple_key not 255 because utf8mb4 takes more space
public $profileurl; // varchar(255) public $profileurl; // varchar(191) not 255 because utf8mb4 takes more space
public $homepage; // varchar(255) multiple_key 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 $lat; // decimal(10,7)
public $lon; // decimal(10,7) public $lon; // decimal(10,7)
public $location_id; // int(4) public $location_id; // int(4)
@ -49,11 +49,11 @@ class Profile extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), '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'), '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'), 'fullname' => array('type' => 'varchar', 'length' => 191, 'description' => 'display name', 'collate' => 'utf8_general_ci'),
'profileurl' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL, cached so we dont regenerate'), 'profileurl' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL, cached so we dont regenerate'),
'homepage' => array('type' => 'varchar', 'length' => 255, 'description' => 'identifying URL', 'collate' => 'utf8_general_ci'), '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'), 'lat' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'latitude'),
'lon' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'longitude'), 'lon' => array('type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'longitude'),
'location_id' => array('type' => 'int', 'description' => 'location id if possible'), 'location_id' => array('type' => 'int', 'description' => 'location id if possible'),

View File

@ -43,8 +43,8 @@ class Profile_list extends Managed_DataObject
public $private; // tinyint(1) public $private; // tinyint(1)
public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00 public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
public $uri; // varchar(255) unique_key public $uri; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $mainpage; // varchar(255) public $mainpage; // varchar(191) not 255 because utf8mb4 takes more space
public $tagged_count; // smallint public $tagged_count; // smallint
public $subscriber_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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date the tag was modified'),
'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'), 'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'),
'mainpage' => array('type' => 'varchar', 'length' => 255, 'description' => 'page to link to'), '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'), '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'), 'subscriber_count' => array('type' => 'int', 'default' => 0, 'description' => 'number of subscribers to this tag'),
), ),

View File

@ -31,8 +31,8 @@ class Profile_prefs extends Managed_DataObject
{ {
public $__table = 'profile_prefs'; // table name public $__table = 'profile_prefs'; // table name
public $profile_id; // int(4) primary_key not_null public $profile_id; // int(4) primary_key not_null
public $namespace; // varchar(255) not_null public $namespace; // varchar(191) not_null
public $topic; // varchar(255) not_null public $topic; // varchar(191) not_null
public $data; // text public $data; // text
public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00 public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
@ -42,8 +42,8 @@ class Profile_prefs extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'), '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'), 'namespace' => array('type' => 'varchar', 'length' => 191, '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...'), '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'), 'data' => array('type' => 'blob', 'description' => 'topic data, may be anything'),
'created' => array('type' => 'datetime', '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -12,7 +12,7 @@ class Sms_carrier extends Managed_DataObject
public $__table = 'sms_carrier'; // table name public $__table = 'sms_carrier'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $name; // varchar(64) unique_key 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 $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -30,7 +30,7 @@ class Sms_carrier extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'not null' => true, 'description' => 'primary key for SMS carrier'), 'id' => array('type' => 'int', 'not null' => true, 'description' => 'primary key for SMS carrier'),
'name' => array('type' => 'varchar', 'length' => 64, 'description' => 'name of the 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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -29,15 +29,15 @@ class Status_network extends Safe_DataObject
public $__table = 'status_network'; // table name public $__table = 'status_network'; // table name
public $site_id; // int(4) primary_key not_null public $site_id; // int(4) primary_key not_null
public $nickname; // varchar(64) unique_key not_null public $nickname; // varchar(64) unique_key not_null
public $hostname; // varchar(255) unique_key public $hostname; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $pathname; // varchar(255) unique_key public $pathname; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $dbhost; // varchar(255) public $dbhost; // varchar(191) not 255 because utf8mb4 takes more space
public $dbuser; // varchar(255) public $dbuser; // varchar(191) not 255 because utf8mb4 takes more space
public $dbpass; // varchar(255) public $dbpass; // varchar(191) not 255 because utf8mb4 takes more space
public $dbname; // varchar(255) public $dbname; // varchar(191) not 255 because utf8mb4 takes more space
public $sitename; // varchar(255) public $sitename; // varchar(191) not 255 because utf8mb4 takes more space
public $theme; // varchar(255) public $theme; // varchar(191) not 255 because utf8mb4 takes more space
public $logo; // varchar(255) public $logo; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP

View File

@ -32,9 +32,9 @@ class Subscription extends Managed_DataObject
public $subscribed; // int(4) primary_key not_null public $subscribed; // int(4) primary_key not_null
public $jabber; // tinyint(1) default_1 public $jabber; // tinyint(1) default_1
public $sms; // tinyint(1) default_1 public $sms; // tinyint(1) default_1
public $token; // varchar(255) public $token; // varchar(191) not 255 because utf8mb4 takes more space
public $secret; // varchar(255) public $secret; // varchar(191) not 255 because utf8mb4 takes more space
public $uri; // varchar(255) public $uri; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP 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'), 'subscribed' => array('type' => 'int', 'not null' => true, 'description' => 'profile being listened to'),
'jabber' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver jabber messages'), 'jabber' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver jabber messages'),
'sms' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver sms messages'), 'sms' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'deliver sms messages'),
'token' => array('type' => 'varchar', 'length' => 255, 'description' => 'authorization token'), 'token' => array('type' => 'varchar', 'length' => 191, 'description' => 'authorization token'),
'secret' => array('type' => 'varchar', 'length' => 255, 'description' => 'token secret'), 'secret' => array('type' => 'varchar', 'length' => 191, 'description' => 'token secret'),
'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universally unique identifier'), 'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier'),
'created' => array('type' => 'datetime', '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -10,13 +10,13 @@ class Token extends Managed_DataObject
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
public $__table = 'token'; // table name 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 $tok; // char(32) primary_key not_null
public $secret; // char(32) not_null public $secret; // char(32) not_null
public $type; // tinyint(1) not_null public $type; // tinyint(1) not_null
public $state; // tinyint(1) public $state; // tinyint(1)
public $verifier; // varchar(255) public $verifier; // varchar(191) not 255 because utf8mb4 takes more space
public $verified_callback; // varchar(255) public $verified_callback; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -27,13 +27,13 @@ class Token extends Managed_DataObject
return array( return array(
'description' => 'OAuth token record', 'description' => 'OAuth token record',
'fields' => array( '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'), 'tok' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'identifying value'),
'secret' => array('type' => 'char', 'length' => 32, 'not null' => true, 'description' => 'secret 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'), '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'), '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'), 'verifier' => array('type' => 'varchar', 'length' => 191, 'description' => 'verifier string for OAuth 1.0a'),
'verified_callback' => array('type' => 'varchar', 'length' => 255, 'description' => 'verified callback URL 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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -34,9 +34,9 @@ class User extends Managed_DataObject
public $__table = 'user'; // table name public $__table = 'user'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $nickname; // varchar(64) unique_key public $nickname; // varchar(64) unique_key
public $password; // varchar(255) public $password; // varchar(191) not 255 because utf8mb4 takes more space
public $email; // varchar(255) unique_key public $email; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $incomingemail; // varchar(255) unique_key public $incomingemail; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $emailnotifysub; // tinyint(1) default_1 public $emailnotifysub; // tinyint(1) default_1
public $emailnotifyfav; // tinyint(1) default_1 public $emailnotifyfav; // tinyint(1) default_1
public $emailnotifynudge; // tinyint(1) default_1 public $emailnotifynudge; // tinyint(1) default_1
@ -50,8 +50,8 @@ class User extends Managed_DataObject
public $carrier; // int(4) public $carrier; // int(4)
public $smsnotify; // tinyint(1) public $smsnotify; // tinyint(1)
public $smsreplies; // tinyint(1) public $smsreplies; // tinyint(1)
public $smsemail; // varchar(255) public $smsemail; // varchar(191) not 255 because utf8mb4 takes more space
public $uri; // varchar(255) unique_key public $uri; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $autosubscribe; // tinyint(1) public $autosubscribe; // tinyint(1)
public $subscribe_policy; // tinyint(1) public $subscribe_policy; // tinyint(1)
public $urlshorteningservice; // varchar(50) default_ur1.ca public $urlshorteningservice; // varchar(50) default_ur1.ca
@ -69,9 +69,9 @@ class User extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'), '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'), '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'), 'password' => array('type' => 'varchar', 'length' => 191, 'description' => 'salted password, can be null for OpenID users'),
'email' => array('type' => 'varchar', 'length' => 255, 'description' => 'email address for password recovery etc.'), 'email' => array('type' => 'varchar', 'length' => 191, 'description' => 'email address for password recovery etc.'),
'incomingemail' => array('type' => 'varchar', 'length' => 255, 'description' => 'email address for post-by-email'), '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'), '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'), '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'), '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'), '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'), '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'), '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'), 'smsemail' => array('type' => 'varchar', 'length' => 191, 'description' => 'built from sms and carrier'),
'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'),
'autosubscribe' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'automatically subscribe to users who subscribe to us'), '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'), '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'), 'urlshorteningservice' => array('type' => 'varchar', 'length' => 50, 'default' => 'internal', 'description' => 'service to use for auto-shortening URLs'),

View File

@ -15,18 +15,18 @@ class User_group extends Managed_DataObject
public $__table = 'user_group'; // table name public $__table = 'user_group'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $nickname; // varchar(64) public $nickname; // varchar(64)
public $fullname; // varchar(255) public $fullname; // varchar(191) not 255 because utf8mb4 takes more space
public $homepage; // varchar(255) public $homepage; // varchar(191) not 255 because utf8mb4 takes more space
public $description; // text public $description; // text
public $location; // varchar(255) public $location; // varchar(191) not 255 because utf8mb4 takes more space
public $original_logo; // varchar(255) public $original_logo; // varchar(191) not 255 because utf8mb4 takes more space
public $homepage_logo; // varchar(255) public $homepage_logo; // varchar(191) not 255 because utf8mb4 takes more space
public $stream_logo; // varchar(255) public $stream_logo; // varchar(191) not 255 because utf8mb4 takes more space
public $mini_logo; // varchar(255) 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 $created; // datetime not_null default_0000-00-00%2000%3A00%3A00
public $modified; // timestamp not_null default_CURRENT_TIMESTAMP public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
public $uri; // varchar(255) unique_key public $uri; // varchar(191) unique_key not 255 because utf8mb4 takes more space
public $mainpage; // varchar(255) public $mainpage; // varchar(191) not 255 because utf8mb4 takes more space
public $join_policy; // tinyint public $join_policy; // tinyint
public $force_scope; // 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'), 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'),
'nickname' => array('type' => 'varchar', 'length' => 64, 'description' => 'nickname for addressing'), 'nickname' => array('type' => 'varchar', 'length' => 64, 'description' => 'nickname for addressing'),
'fullname' => array('type' => 'varchar', 'length' => 255, 'description' => 'display name'), 'fullname' => array('type' => 'varchar', 'length' => 191, 'description' => 'display name'),
'homepage' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL, cached so we dont regenerate'), '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'), 'original_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'original size logo'),
'homepage_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'homepage (profile) size logo'), 'homepage_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'homepage (profile) size logo'),
'stream_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'stream-sized logo'), 'stream_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'stream-sized logo'),
'mini_logo' => array('type' => 'varchar', 'length' => 255, 'description' => 'mini logo'), 'mini_logo' => array('type' => 'varchar', 'length' => 191, 'description' => 'mini logo'),
'created' => array('type' => 'datetime', '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'universal identifier'), 'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'),
'mainpage' => array('type' => 'varchar', 'length' => 255, 'description' => 'page for group info to link to'), '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'), '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'), 'force_scope' => array('type' => 'int', 'size' => 'tiny', 'description' => '0=never,1=sometimes,-1=always'),
), ),

View File

@ -36,8 +36,8 @@ class User_im_prefs extends Managed_DataObject
public $__table = 'user_im_prefs'; // table name public $__table = 'user_im_prefs'; // table name
public $user_id; // int(4) primary_key not_null public $user_id; // int(4) primary_key not_null
public $screenname; // varchar(255) not_null public $screenname; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $transport; // varchar(255) not_null public $transport; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $notify; // tinyint(1) public $notify; // tinyint(1)
public $replies; // tinyint(1) public $replies; // tinyint(1)
public $microid; // tinyint(1) public $microid; // tinyint(1)
@ -53,8 +53,8 @@ class User_im_prefs extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'), 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user'),
'screenname' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'screenname on this service'), 'screenname' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'screenname on this service'),
'transport' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'transport (ex xmpp, aim)'), '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'), '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'), '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'), 'microid' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => 'Publish a MicroID'),

View File

@ -11,8 +11,8 @@ class User_username extends Managed_DataObject
public $__table = 'user_username'; // table name public $__table = 'user_username'; // table name
public $user_id; // int(4) not_null public $user_id; // int(4) not_null
public $provider_name; // 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(255) primary_key not_null public $username; // varchar(191) primary_key not_null not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -23,8 +23,8 @@ class User_username extends Managed_DataObject
{ {
return array( return array(
'fields' => array( 'fields' => array(
'provider_name' => array('type' => 'varchar', 'length' => 255, 'description' => 'provider name'), 'provider_name' => array('type' => 'varchar', 'length' => 191, 'description' => 'provider name'),
'username' => array('type' => 'varchar', 'length' => 255, 'description' => 'username'), 'username' => array('type' => 'varchar', 'length' => 191, 'description' => 'username'),
'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice id this title relates to'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -21,7 +21,7 @@ create table status_network (
created datetime not null comment 'date this record was created', created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified' 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 ( create table status_network_tag (
site_id integer comment 'unique id', site_id integer comment 'unique id',
@ -30,5 +30,5 @@ create table status_network_tag (
constraint primary key (site_id, tag), constraint primary key (site_id, tag),
index status_network_tag_tag_idx (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;

View File

@ -962,6 +962,7 @@ class DB_Error extends PEAR_Error
function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN, function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN,
$level = E_USER_NOTICE, $debuginfo = null) $level = E_USER_NOTICE, $debuginfo = null)
{ {
common_debug(var_export($debuginfo,true));
if (is_int($code)) { if (is_int($code)) {
$this->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code, $this->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code,
$mode, $level, $debuginfo); $mode, $level, $debuginfo);

View 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; * Disables any and all handlers that have been set up so far;
* use only if you know it's safe to reinitialize all plugins. * use only if you know it's safe to reinitialize all plugins.

View File

@ -271,7 +271,7 @@ class MysqlSchema extends Schema
function endCreateTable($name, array $def) function endCreateTable($name, array $def)
{ {
$engine = $this->preferredEngine($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)) { if (strtolower($oldProps['ENGINE']) != strtolower($engine)) {
$phrase[] = "ENGINE=$engine"; $phrase[] = "ENGINE=$engine";
} }
if (strtolower($oldProps['TABLE_COLLATION']) != 'utf8_bin') { if (strtolower($oldProps['TABLE_COLLATION']) != 'utf8mb4_bin') {
$phrase[] = 'DEFAULT CHARSET=utf8'; $phrase[] = 'CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin';
$phrase[] = 'COLLATE=utf8_bin'; $phrase[] = 'DEFAULT CHARACTER SET = utf8mb4';
$phrase[] = 'DEFAULT COLLATE = utf8mb4_bin';
} }
} }

View File

@ -47,7 +47,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
class Homepage_blacklist extends Managed_DataObject class Homepage_blacklist extends Managed_DataObject
{ {
public $__table = 'homepage_blacklist'; // table name 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 $created; // datetime not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -55,7 +55,7 @@ class Homepage_blacklist extends Managed_DataObject
{ {
return array( return array(
'fields' => 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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -47,7 +47,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
class Nickname_blacklist extends Managed_DataObject class Nickname_blacklist extends Managed_DataObject
{ {
public $__table = 'nickname_blacklist'; // table name 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 $created; // datetime not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -55,7 +55,7 @@ class Nickname_blacklist extends Managed_DataObject
{ {
return array( return array(
'fields' => 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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -51,11 +51,11 @@ class Blog_entry extends Managed_DataObject
public $id; // UUID public $id; // UUID
public $profile_id; // int public $profile_id; // int
public $title; // varchar(255) public $title; // varchar(191) not 255 because utf8mb4 takes more space
public $summary; // text public $summary; // text
public $content; // text public $content; // text
public $uri; // text public $uri; // varchar(191) not 255 because utf8mb4 takes more space
public $url; // text public $url; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime public $created; // datetime
public $modified; // datetime public $modified; // datetime
@ -74,17 +74,17 @@ class Blog_entry extends Managed_DataObject
'not null' => true, 'not null' => true,
'description' => 'Author profile ID'), 'description' => 'Author profile ID'),
'title' => array('type' => 'varchar', 'title' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'description' => 'title of the entry'), 'description' => 'title of the entry'),
'summary' => array('type' => 'text', 'summary' => array('type' => 'text',
'description' => 'initial summary'), 'description' => 'initial summary'),
'content' => array('type' => 'text', 'content' => array('type' => 'text',
'description' => 'HTML content of the entry'), 'description' => 'HTML content of the entry'),
'uri' => array('type' => 'varchar', 'uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'description' => 'URI (probably http://) for this entry'), 'description' => 'URI (probably http://) for this entry'),
'url' => array('type' => 'varchar', 'url' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'description' => 'URL (probably http://) for this entry'), 'description' => 'URL (probably http://) for this entry'),
'created' => array('type' => 'datetime', 'created' => array('type' => 'datetime',
'not null' => true, 'not null' => true,

View File

@ -47,10 +47,10 @@ class Bookmark extends Managed_DataObject
public $__table = 'bookmark'; // table name public $__table = 'bookmark'; // table name
public $id; // char(36) primary_key not_null public $id; // char(36) primary_key not_null
public $profile_id; // int(4) not_null public $profile_id; // int(4) not_null
public $url; // varchar(255) not_null public $url; // varchar(191) not_null not 255 because utf8mb4 takes more space
public $title; // varchar(255) 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 $created; // datetime
public static function schemaDef() public static function schemaDef()
@ -62,12 +62,12 @@ class Bookmark extends Managed_DataObject
'not null' => true), 'not null' => true),
'profile_id' => array('type' => 'int', 'not null' => true), 'profile_id' => array('type' => 'int', 'not null' => true),
'uri' => array('type' => 'varchar', 'uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'url' => array('type' => 'varchar', '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'), 'description' => array('type' => 'text'),
'created' => array('type' => 'datetime', 'not null' => true), 'created' => array('type' => 'datetime', 'not null' => true),
), ),

View File

@ -13,12 +13,12 @@ class Message extends Managed_DataObject
public $__table = 'message'; // table name public $__table = 'message'; // table name
public $id; // int(4) primary_key not_null 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 $from_profile; // int(4) not_null
public $to_profile; // int(4) not_null public $to_profile; // int(4) not_null
public $content; // text() public $content; // text()
public $rendered; // 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 $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
public $source; // varchar(32) public $source; // varchar(32)
@ -31,12 +31,12 @@ class Message extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), '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'), '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'), 'to_profile' => array('type' => 'int', 'not null' => true, 'description' => 'who the message is to'),
'content' => array('type' => 'text', 'description' => 'message content'), 'content' => array('type' => 'text', 'description' => 'message content'),
'rendered' => array('type' => 'text', 'description' => 'HTML version of the 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'), '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'), '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"'), 'source' => array('type' => 'varchar', 'length' => 32, 'description' => 'source of comment, like "web", "im", or "clientname"'),

View 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 $type; // type of reminder varchar(191) not 255 because utf8mb4 takes more space
public $code; // confirmation code public $code; // confirmation code varchar(191) not 255 because utf8mb4 takes more space
public $days; // number of days after code was created public $days; // number of days after code was created
public $sent; // timestamp public $sent; // timestamp
public $created; // timestamp public $created; // timestamp
@ -102,14 +102,14 @@ class Email_reminder extends Managed_DataObject
'fields' => array( 'fields' => array(
'type' => array( 'type' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true, 'not null' => true,
'description' => 'type of reminder' 'description' => 'type of reminder'
), ),
'code' => array( 'code' => array(
'type' => 'varchar', 'type' => 'varchar',
'not null' => 'true', 'not null' => 'true',
'length' => 255, 'length' => 191,
'description' => 'confirmation code' 'description' => 'confirmation code'
), ),
'days' => array( 'days' => array(

View File

@ -53,13 +53,13 @@ class Happening extends Managed_DataObject
public $__table = 'happening'; // table name public $__table = 'happening'; // table name
public $id; // varchar(36) UUID 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 $profile_id; // int
public $start_time; // datetime public $start_time; // datetime
public $end_time; // datetime public $end_time; // datetime
public $title; // varchar(255) public $title; // varchar(191) not 255 because utf8mb4 takes more space
public $location; // varchar(255) public $location; // varchar(191) not 255 because utf8mb4 takes more space
public $url; // varchar(255) public $url; // varchar(191) not 255 because utf8mb4 takes more space
public $description; // text public $description; // text
public $created; // datetime public $created; // datetime
@ -76,18 +76,18 @@ class Happening extends Managed_DataObject
'not null' => true, 'not null' => true,
'description' => 'UUID'), 'description' => 'UUID'),
'uri' => array('type' => 'varchar', 'uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'profile_id' => array('type' => 'int', 'not null' => true), 'profile_id' => array('type' => 'int', 'not null' => true),
'start_time' => array('type' => 'datetime', 'not null' => true), 'start_time' => array('type' => 'datetime', 'not null' => true),
'end_time' => array('type' => 'datetime', 'not null' => true), 'end_time' => array('type' => 'datetime', 'not null' => true),
'title' => array('type' => 'varchar', 'title' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'location' => array('type' => 'varchar', 'location' => array('type' => 'varchar',
'length' => 255), 'length' => 191),
'url' => array('type' => 'varchar', 'url' => array('type' => 'varchar',
'length' => 255), 'length' => 191),
'description' => array('type' => 'text'), 'description' => array('type' => 'text'),
'created' => array('type' => 'datetime', 'created' => array('type' => 'datetime',
'not null' => true), 'not null' => true),

View File

@ -50,7 +50,7 @@ class RSVP extends Managed_DataObject
public $__table = 'rsvp'; // table name public $__table = 'rsvp'; // table name
public $id; // varchar(36) UUID 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 $profile_id; // int
public $event_id; // varchar(36) UUID public $event_id; // varchar(36) UUID
public $response; // tinyint public $response; // tinyint
@ -83,7 +83,7 @@ class RSVP extends Managed_DataObject
'not null' => true, 'not null' => true,
'description' => 'UUID'), 'description' => 'UUID'),
'uri' => array('type' => 'varchar', 'uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'profile_id' => array('type' => 'int'), 'profile_id' => array('type' => 'int'),
'event_id' => array('type' => 'char', 'event_id' => array('type' => 'char',

View File

@ -52,7 +52,7 @@ class Notice_to_item extends Managed_DataObject
{ {
public $__table = 'notice_to_item'; // table name public $__table = 'notice_to_item'; // table name
public $notice_id; // int(4) primary_key not_null 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( return array(
new ColumnDef('notice_id', 'integer', null, false, 'PRI'), 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)
); );
} }

View File

@ -8,7 +8,7 @@ class Fave extends Managed_DataObject
public $__table = 'fave'; // table name public $__table = 'fave'; // table name
public $notice_id; // int(4) primary_key not_null public $notice_id; // int(4) primary_key not_null
public $user_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 $created; // datetime multiple_key not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -18,7 +18,7 @@ class Fave extends Managed_DataObject
'fields' => array( 'fields' => array(
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice that is the favorite'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -39,10 +39,10 @@ class Photo extends Managed_DataObject
public $__table = 'photo'; // table name public $__table = 'photo'; // table name
public $id; // char (36) // UUID public $id; // char (36) // UUID
public $uri; // varchar (255) // This is the corresponding notice's uri. public $uri; // varchar (191) // This is the corresponding notice's uri. not 255 because utf8mb4 takes more space
public $photo_uri; // varchar (255) public $photo_uri; // varchar (191) not 255 because utf8mb4 takes more space
public $thumb_uri; // varchar (255) public $thumb_uri; // varchar (191) not 255 because utf8mb4 takes more space
public $title; // varchar (255) public $title; // varchar (191) not 255 because utf8mb4 takes more space
public $description; // text public $description; // text
public $profile_id; // int public $profile_id; // int
@ -66,13 +66,13 @@ class Photo extends Managed_DataObject
'not null' => true, 'not null' => true,
'description' => 'UUID'), 'description' => 'UUID'),
'uri' => array('type' => 'varchar', 'uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'photo_uri' => array('type' => 'varchar', 'photo_uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'photo_uri' => array('type' => 'varchar', 'photo_uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'profile_id' => array('type' => 'int', 'not null' => true), 'profile_id' => array('type' => 'int', 'not null' => true),
), ),

View File

@ -38,9 +38,9 @@ class GNUsocialPhoto extends Managed_DataObject
public $id; // int(11) public $id; // int(11)
public $notice_id; // int(11) public $notice_id; // int(11)
public $album_id; // int(11) public $album_id; // int(11)
public $uri; // varchar(255) public $uri; // varchar(191) not 255 because utf8mb4 takes more space
public $thumb_uri; // varchar(255) public $thumb_uri; // varchar(191) not 255 because utf8mb4 takes more space
public $title; // varchar(255) public $title; // varchar(191) not 255 because utf8mb4 takes more space
public $photo_description; // text public $photo_description; // text
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP 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'), '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'), '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'), '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'), 'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'unique address for this photo'),
'thumb_uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'unique address for this photo thumbnail'), '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' => 255, 'description' => 'The Photo title'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -38,7 +38,7 @@ class GNUsocialPhotoAlbum extends Managed_DataObject
public $__table = 'GNUsocialPhotoAlbum'; public $__table = 'GNUsocialPhotoAlbum';
public $album_id; // int(11) -- Unique identifier for the album public $album_id; // int(11) -- Unique identifier for the album
public $profile_id; // int(11) -- Profile ID for the owner of 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 $album_description; // text -- A description of the album
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -50,7 +50,7 @@ class GNUsocialPhotoAlbum extends Managed_DataObject
'fields' => array( 'fields' => array(
'album_id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique identifier for the album'), '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'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -37,9 +37,9 @@ class GNUsocialProfileExtensionField extends Managed_DataObject
public $__table = 'gnusocialprofileextensionfield'; public $__table = 'gnusocialprofileextensionfield';
public $id; // int(11) public $id; // int(11)
public $systemname; // varchar(64) 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 $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -49,9 +49,9 @@ class GNUsocialProfileExtensionField extends Managed_DataObject
'fields' => array( 'fields' => array(
'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for extension field'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),

View File

@ -39,8 +39,8 @@ class Video extends Managed_DataObject
public $__table = 'video'; // table name public $__table = 'video'; // table name
public $id; // char (36) // UUID public $id; // char (36) // UUID
public $uri; // varchar (255) // This is the corresponding notice's uri. public $uri; // varchar (191) This is the corresponding notice's uri. not 255 because utf8mb4 takes more space
public $url; // varchar (255) public $url; // varchar (191) not 255 because utf8mb4 takes more space
public $profile_id; // int public $profile_id; // int
public static function getByNotice($notice) public static function getByNotice($notice)
@ -63,10 +63,10 @@ class Video extends Managed_DataObject
'not null' => true, 'not null' => true,
'description' => 'UUID'), 'description' => 'UUID'),
'uri' => array('type' => 'varchar', 'uri' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'url' => array('type' => 'varchar', 'url' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true), 'not null' => true),
'profile_id' => array('type' => 'int', 'not null' => true), 'profile_id' => array('type' => 'int', 'not null' => true),
), ),

View File

@ -48,12 +48,12 @@ class Group_message extends Managed_DataObject
{ {
public $__table = 'group_message'; // table name public $__table = 'group_message'; // table name
public $id; // char(36) primary_key not_null 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 $from_profile; // int
public $to_group; // int public $to_group; // int
public $content; public $content;
public $rendered; public $rendered;
public $url; public $url; // varchar(191) not 255 because utf8mb4 takes more space
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -62,8 +62,8 @@ class Group_message extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'id' => array('type' => 'char', 'not null' => true, 'length' => 36, 'description' => 'message uuid'), 'id' => array('type' => 'char', 'not null' => true, 'length' => 36, 'description' => 'message uuid'),
'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'message uri'), 'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'message uri'),
'url' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'representation url'), 'url' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'representation url'),
'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'sending profile ID'), 'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'sending profile ID'),
'to_group' => array('type' => 'int', 'not null' => true, 'description' => 'receiving group ID'), 'to_group' => array('type' => 'int', 'not null' => true, 'description' => 'receiving group ID'),
'content' => array('type' => 'text', 'not null' => true, 'description' => 'message content'), 'content' => array('type' => 'text', 'not null' => true, 'description' => 'message content'),

View 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 $__table = 'notice_title'; // table name
public $notice_id; // int(11) primary_key not_null 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 $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP

View File

@ -62,7 +62,7 @@ class FeedSub extends Managed_DataObject
public $__table = 'feedsub'; public $__table = 'feedsub';
public $id; public $id;
public $uri; public $uri; // varchar(191) not 255 because utf8mb4 takes more space
// PuSH subscription data // PuSH subscription data
public $huburi; public $huburi;
@ -80,7 +80,7 @@ class FeedSub extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'id' => array('type' => 'serial', 'not null' => true, 'description' => 'FeedSub local unique id'), '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'), 'huburi' => array('type' => 'text', 'description' => 'FeedSub hub-uri'),
'secret' => array('type' => 'text', 'description' => 'FeedSub stored secret'), 'secret' => array('type' => 'text', 'description' => 'FeedSub stored secret'),
'sub_state' => array('type' => 'enum("subscribe","active","unsubscribe","inactive","nohub")', 'not null' => true, 'description' => 'subscription state'), 'sub_state' => array('type' => 'enum("subscribe","active","unsubscribe","inactive","nohub")', 'not null' => true, 'description' => 'subscription state'),

View File

@ -31,8 +31,8 @@ class HubSub extends Managed_DataObject
public $__table = 'hubsub'; public $__table = 'hubsub';
public $hashkey; // sha1(topic . '|' . $callback); (topic, callback) key is too long for myisam in utf8 public $hashkey; // sha1(topic . '|' . $callback); (topic, callback) key is too long for myisam in utf8
public $topic; public $topic; // varchar(191) not 255 because utf8mb4 takes more space
public $callback; public $callback; // varchar(191) not 255 because utf8mb4 takes more space
public $secret; public $secret;
public $lease; public $lease;
public $sub_start; public $sub_start;
@ -55,8 +55,8 @@ class HubSub extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'hashkey' => array('type' => 'char', 'not null' => true, 'length' => 40, 'description' => 'HubSub hashkey'), 'hashkey' => array('type' => 'char', 'not null' => true, 'length' => 40, 'description' => 'HubSub hashkey'),
'topic' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'HubSub topic'), 'topic' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'HubSub topic'),
'callback' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'HubSub callback'), 'callback' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'HubSub callback'),
'secret' => array('type' => 'text', 'description' => 'HubSub stored secret'), 'secret' => array('type' => 'text', 'description' => 'HubSub stored secret'),
'lease' => array('type' => 'int', 'description' => 'HubSub leasetime'), 'lease' => array('type' => 'int', 'description' => 'HubSub leasetime'),
'sub_start' => array('type' => 'datetime', 'description' => 'subscription start'), 'sub_start' => array('type' => 'datetime', 'description' => 'subscription start'),

View File

@ -51,12 +51,12 @@ class Ostatus_profile extends Managed_DataObject
{ {
return array( return array(
'fields' => 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'), 'profile_id' => array('type' => 'integer'),
'group_id' => array('type' => 'integer'), 'group_id' => array('type' => 'integer'),
'peopletag_id' => array('type' => 'integer'), 'peopletag_id' => array('type' => 'integer'),
'feeduri' => array('type' => 'varchar', 'length' => 255), 'feeduri' => array('type' => 'varchar', 'length' => 191),
'salmonuri' => array('type' => 'varchar', 'length' => 255), 'salmonuri' => array('type' => 'varchar', 'length' => 191),
'avatar' => array('type' => 'text'), 'avatar' => array('type' => 'text'),
'created' => array('type' => 'datetime', 'not null' => true), 'created' => array('type' => 'datetime', 'not null' => true),
'modified' => array('type' => 'datetime', 'not null' => true), 'modified' => array('type' => 'datetime', 'not null' => true),
@ -1795,8 +1795,8 @@ class Ostatus_profile extends Managed_DataObject
} }
if (!empty($location)) { if (!empty($location)) {
if (mb_strlen($location) > 255) { if (mb_strlen($location) > 191) { // not 255 because utf8mb4 takes more space
$location = mb_substr($note, 0, 255 - 3) . ' … '; $location = mb_substr($note, 0, 191 - 3) . ' … ';
} }
} }

View File

@ -40,7 +40,7 @@ class Ostatus_source extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID relation'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -31,14 +31,14 @@ class File_oembed extends Managed_DataObject
public $type; // varchar(20) public $type; // varchar(20)
public $mimetype; // varchar(50) public $mimetype; // varchar(50)
public $provider; // 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 $width; // int(4)
public $height; // int(4) public $height; // int(4)
public $html; // text() 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 $author_url; // varchar(191) not 255 because utf8mb4 takes more space
public $url; // varchar(255) public $url; // varchar(191) not 255 because utf8mb4 takes more space
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
public static function schemaDef() 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'), 'type' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed type: photo, video, link, rich'),
'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'), 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
'provider' => array('type' => 'varchar', 'length' => 50, 'description' => 'name of this oEmbed provider'), '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'), 'width' => array('type' => 'int', 'description' => 'width of oEmbed resource when available'),
'height' => array('type' => 'int', 'description' => 'height 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'), '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'), 'author_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'author URL for this oEmbed resource'),
'url' => array('type' => 'varchar', 'length' => 255, 'description' => 'URL for this oEmbed resource when applicable (photo, link)'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
), ),
'primary key' => array('file_id'), 'primary key' => array('file_id'),

View File

@ -13,8 +13,8 @@ class User_openid extends Managed_DataObject
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
public $__table = 'user_openid'; // table name public $__table = 'user_openid'; // table name
public $canonical; // varchar(255) primary_key not_null public $canonical; // varchar(191) primary_key not_null
public $display; // varchar(255) unique_key not_null public $display; // varchar(191) unique_key not_null
public $user_id; // int(4) not_null public $user_id; // int(4) not_null
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -26,8 +26,8 @@ class User_openid extends Managed_DataObject
{ {
return array( return array(
'fields' => array( 'fields' => array(
'canonical' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'OpenID canonical string'), 'canonical' => array('type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'OpenID canonical string'),
'display' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'OpenID display 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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -13,7 +13,7 @@ class User_openid_trustroot extends Managed_DataObject
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
public $__table = 'user_openid_trustroot'; // table name 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 $user_id; // int(4) primary_key not_null
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -25,7 +25,7 @@ class User_openid_trustroot extends Managed_DataObject
{ {
return array( return array(
'fields' => 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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),

View File

@ -47,7 +47,7 @@ class Poll extends Managed_DataObject
{ {
public $__table = 'poll'; // table name public $__table = 'poll'; // table name
public $id; // char(36) primary key not null -> UUID 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 $profile_id; // int -> profile.id
public $question; // text public $question; // text
public $options; // text; newline(?)-delimited public $options; // text; newline(?)-delimited
@ -62,7 +62,7 @@ class Poll extends Managed_DataObject
'description' => 'Per-notice poll data for Poll plugin', 'description' => 'Per-notice poll data for Poll plugin',
'fields' => array( 'fields' => array(
'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID'), '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'), 'profile_id' => array('type' => 'int'),
'question' => array('type' => 'text'), 'question' => array('type' => 'text'),
'options' => array('type' => 'text'), 'options' => array('type' => 'text'),

View File

@ -46,7 +46,7 @@ class Poll_response extends Managed_DataObject
{ {
public $__table = 'poll_response'; // table name public $__table = 'poll_response'; // table name
public $id; // char(36) primary key not null -> UUID 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 $poll_id; // char(36) -> poll.id UUID
public $profile_id; // int -> profile.id public $profile_id; // int -> profile.id
public $selection; // int -> choice # public $selection; // int -> choice #
@ -61,7 +61,7 @@ class Poll_response extends Managed_DataObject
'description' => 'Record of responses to polls', 'description' => 'Record of responses to polls',
'fields' => array( 'fields' => array(
'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID of the response'), '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'), 'poll_id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID of poll being responded to'),
'profile_id' => array('type' => 'int'), 'profile_id' => array('type' => 'int'),
'selection' => array('type' => 'int'), 'selection' => array('type' => 'int'),

View File

@ -48,7 +48,7 @@ class QnA_Answer extends Managed_DataObject
public $__table = 'qna_answer'; // table name public $__table = 'qna_answer'; // table name
public $id; // char(36) primary key not null -> UUID 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 $question_id; // char(36) -> question.id UUID
public $profile_id; // int -> question.id public $profile_id; // int -> question.id
public $best; // (boolean) int -> whether the question asker has marked this as the best answer 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( 'uri' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true, 'not null' => true,
'description' => 'UUID to the answer notice', 'description' => 'UUID to the answer notice',
), ),

View File

@ -48,7 +48,7 @@ class QnA_Question extends Managed_DataObject
public $__table = 'qna_question'; // table name public $__table = 'qna_question'; // table name
public $id; // char(36) primary key not null -> UUID 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 $profile_id; // int -> profile.id
public $title; // text public $title; // text
public $description; // text public $description; // text
@ -71,7 +71,7 @@ class QnA_Question extends Managed_DataObject
), ),
'uri' => array( 'uri' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true 'not null' => true
), ),
'profile_id' => array('type' => 'int'), 'profile_id' => array('type' => 'int'),

View File

@ -53,9 +53,9 @@ class Realtime_channel extends Managed_DataObject
public $__table = 'realtime_channel'; // table name public $__table = 'realtime_channel'; // table name
public $user_id; // int -> user.id, can be null public $user_id; // int -> user.id, can be null
public $action; // string public $action; // varchar(191) not 255 because utf8mb4 takes more space
public $arg1; // argument public $arg1; // varchar(191) argument not 255 because utf8mb4 takes more space
public $arg2; // argument, usually null public $arg2; // varchar(191) usually null not 255 because utf8mb4 takes more space
public $channel_key; // 128-bit shared secret key public $channel_key; // 128-bit shared secret key
public $audience; // listener count public $audience; // listener count
public $created; // created date public $created; // created date
@ -73,15 +73,15 @@ class Realtime_channel extends Managed_DataObject
'not null' => false, 'not null' => false,
'description' => 'user viewing page; can be null'), 'description' => 'user viewing page; can be null'),
'action' => array('type' => 'varchar', 'action' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => true, 'not null' => true,
'description' => 'page being viewed'), 'description' => 'page being viewed'),
'arg1' => array('type' => 'varchar', 'arg1' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => false, 'not null' => false,
'description' => 'page argument, like username or tag'), 'description' => 'page argument, like username or tag'),
'arg2' => array('type' => 'varchar', 'arg2' => array('type' => 'varchar',
'length' => 255, 'length' => 191,
'not null' => false, 'not null' => false,
'description' => 'second page argument, like tag for showstream'), 'description' => 'second page argument, like tag for showstream'),
'channel_key' => array('type' => 'varchar', 'channel_key' => array('type' => 'varchar',

View File

@ -52,7 +52,7 @@ class Twitter_synch_status extends Managed_DataObject
{ {
public $__table = 'twitter_synch_status'; // table name public $__table = 'twitter_synch_status'; // table name
public $foreign_id; // bigint primary_key not_null 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 $last_id; // bigint not_null
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
@ -62,7 +62,7 @@ class Twitter_synch_status extends Managed_DataObject
return array( return array(
'fields' => array( 'fields' => array(
'foreign_id' => array('type' => 'int', 'size' => 'big', 'not null' => true, 'description' => 'Foreign message ID'), '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'), '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'), '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'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),