From 40fe10e0021c4d3df779cfdb9ebdd9fd9def4850 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 21 Aug 2013 14:33:45 +0200 Subject: [PATCH] Woops, forgot auto_increment (comes with 'serial') There are still some classes not ported (like Yammer import) --- classes/Conversation.php | 4 ++-- plugins/GroupPrivateMessage/Group_message.php | 4 ++-- plugins/GroupPrivateMessage/Group_message_profile.php | 2 +- plugins/Irc/Irc_waiting_message.php | 2 +- plugins/Msn/msn_waiting_message.php | 2 +- plugins/OStatus/classes/FeedSub.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/classes/Conversation.php b/classes/Conversation.php index 547a553d3b..23f8dada0b 100755 --- a/classes/Conversation.php +++ b/classes/Conversation.php @@ -36,7 +36,7 @@ class Conversation extends Managed_DataObject public $__table = 'conversation'; // table name public $id; // int(4) primary_key not_null - public $uri; // varchar(225) unique_key + public $uri; // varchar(255) unique_key public $created; // datetime not_null public $modified; // timestamp not_null default_CURRENT_TIMESTAMP @@ -48,7 +48,7 @@ class Conversation extends Managed_DataObject return array( 'fields' => array( 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), - 'uri' => array('type' => 'varchar', 'length' => 225, 'description' => 'URI of the conversation'), + 'uri' => array('type' => 'varchar', 'length' => 255, 'description' => 'URI of the conversation'), 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), ), diff --git a/plugins/GroupPrivateMessage/Group_message.php b/plugins/GroupPrivateMessage/Group_message.php index 30b98adecd..7e825d416d 100644 --- a/plugins/GroupPrivateMessage/Group_message.php +++ b/plugins/GroupPrivateMessage/Group_message.php @@ -47,7 +47,7 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php'; class Group_message extends Managed_DataObject { public $__table = 'group_message'; // table name - public $id; // varchar(36) primary_key not_null + public $id; // char(36) primary_key not_null public $uri; // varchar(255) public $from_profile; // int public $to_group; // int @@ -61,7 +61,7 @@ class Group_message extends Managed_DataObject { return array( 'fields' => array( - 'id' => array('type' => 'varchar', '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'), 'url' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'representation url'), 'from_profile' => array('type' => 'int', 'not null' => true, 'description' => 'sending profile ID'), diff --git a/plugins/GroupPrivateMessage/Group_message_profile.php b/plugins/GroupPrivateMessage/Group_message_profile.php index 5f16dc2eab..ad465b96ea 100644 --- a/plugins/GroupPrivateMessage/Group_message_profile.php +++ b/plugins/GroupPrivateMessage/Group_message_profile.php @@ -57,7 +57,7 @@ class Group_message_profile extends Managed_DataObject return array( 'fields' => array( 'to_profile' => array('type' => 'int', 'not null' => true, 'description' => 'id of group direct message'), - 'group_message_id' => array('type' => 'varchar', 'not null' => true, 'length' => 36, 'description' => 'group message uuid'), + 'group_message_id' => array('type' => 'char', 'not null' => true, 'length' => 36, 'description' => 'related group message uuid'), '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'), ), diff --git a/plugins/Irc/Irc_waiting_message.php b/plugins/Irc/Irc_waiting_message.php index df7db05b58..eefd904985 100644 --- a/plugins/Irc/Irc_waiting_message.php +++ b/plugins/Irc/Irc_waiting_message.php @@ -20,7 +20,7 @@ class Irc_waiting_message extends Managed_DataObject { { return array( 'fields' => array( - 'id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique ID for entry'), + 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for entry'), 'data' => array('type' => 'blob', 'not null' => true, 'description' => 'data blob'), 'prioritise' => array('type' => 'int', 'size' => 'tiny', 'description' => 'tinyint priority value'), 'attempts' => array('type' => 'int', 'not null' => true, 'description' => 'attempts count'), diff --git a/plugins/Msn/msn_waiting_message.php b/plugins/Msn/msn_waiting_message.php index 770b1c7df3..cfb69def00 100644 --- a/plugins/Msn/msn_waiting_message.php +++ b/plugins/Msn/msn_waiting_message.php @@ -18,7 +18,7 @@ class Msn_waiting_message extends Managed_DataObject { { return array( 'fields' => array( - 'id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique ID for entry'), + 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for entry'), 'screenname' => array('type' => 'varchar', 'length' => 255, 'description' => 'from screenname'), 'message' => array('type' => 'text', 'not null' => true, 'description' => 'MSN message text'), 'claimed' => array('type' => 'datetime', 'description' => 'date this irc message was claimed'), diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index b84a13115d..096baff202 100644 --- a/plugins/OStatus/classes/FeedSub.php +++ b/plugins/OStatus/classes/FeedSub.php @@ -82,7 +82,7 @@ class FeedSub extends Managed_DataObject { return array( 'fields' => array( - 'id' => array('type' => 'int', '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'), 'huburi' => array('type' => 'text', 'description' => 'FeedSub hub-uri'), 'verify_token' => array('type' => 'text', 'description' => 'FeedSub verify-token'), -- 2.39.2