move core schema to class files

This commit is contained in:
Evan Prodromou
2011-08-22 17:52:02 -04:00
parent 8eac5d2638
commit 9ca3c3d1c3
58 changed files with 1281 additions and 1121 deletions

View File

@@ -29,7 +29,7 @@
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
class Inbox extends Memcached_DataObject
class Inbox extends Managed_DataObject
{
const BOXCAR = 128;
const MAX_NOTICES = 1024;
@@ -47,6 +47,20 @@ class Inbox extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
public static function schemaDef()
{
return array(
'fields' => array(
'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user receiving the notice'),
'notice_ids' => array('type' => 'blob', 'description' => 'packed list of notice ids'),
),
'primary key' => array('user_id'),
'foreign keys' => array(
'inbox_user_id_fkey' => array('user', array('user_id' => 'id')),
),
);
}
function sequenceKey()
{
return array(false, false, false);