- return array(new ColumnDef('uri', 'varchar',
- 255, false, 'PRI'),
- new ColumnDef('profile_id', 'integer',
- null, true, 'UNI'),
- new ColumnDef('group_id', 'integer',
- null, true, 'UNI'),
- new ColumnDef('feeduri', 'varchar',
- 255, true, 'UNI'),
- new ColumnDef('salmonuri', 'text',
- null, true),
- new ColumnDef('avatar', 'text',
- null, true),
- new ColumnDef('created', 'datetime',
- null, false),
- new ColumnDef('modified', 'datetime',
- null, false));
- }
-
- /**
- * return key definitions for DB_DataObject
- *
- * DB_DataObject needs to know about keys that the table has; this function
- * defines them.
- *
- * @return array key definitions
- */
-
- function keys()
- {
- return array_keys($this->keyTypes());
- }
-
- /**
- * return key definitions for Memcached_DataObject
- *
- * Our caching system uses the same key definitions, but uses a different
- * method to get them.
- *
- * @return array key definitions
- */
-
- function keyTypes()
- {
- return array('uri' => 'K', 'profile_id' => 'U', 'group_id' => 'U', 'feeduri' => 'U');
- }
-
- function sequenceKey()
- {
- return array(false, false, false);
+ return array(
+ 'fields' => array(
+ 'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true),
+ 'profile_id' => array('type' => 'integer'),
+ 'group_id' => array('type' => 'integer'),
+ 'feeduri' => array('type' => 'varchar', 'length' => 255),
+ 'salmonuri' => array('type' => 'varchar', 'length' => 255),
+ 'avatar' => array('type' => 'text'),
+ 'created' => array('type' => 'datetime', 'not null' => true),
+ 'modified' => array('type' => 'datetime', 'not null' => true),
+ ),
+ 'primary key' => array('uri'),
+ 'unique keys' => array(
+ 'ostatus_profile_profile_id_idx' => array('profile_id'),
+ 'ostatus_profile_group_id_idx' => array('group_id'),
+ 'ostatus_profile_feeduri_idx' => array('feeduri'),
+ ),
+ 'foreign keys' => array(
+ 'profile_id' => array('profile' => 'id'),
+ 'group_id' => array('user_group' => 'id'),
+ ),
+ );