From: Evan Prodromou Date: Mon, 22 Aug 2011 22:02:29 +0000 (-0400) Subject: forgot Group_member::schemaDef() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ed88dee940e1f873c62742c562d53ef36a16291;p=quix0rs-gnu-social.git forgot Group_member::schemaDef() --- diff --git a/classes/Group_member.php b/classes/Group_member.php index cc7e4a353e..0477e7629b 100644 --- a/classes/Group_member.php +++ b/classes/Group_member.php @@ -21,6 +21,30 @@ class Group_member extends Managed_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE + public static function schemaDef() + { + return array( + 'fields' => array( + 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to user_group'), + 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to profile table'), + 'is_admin' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'is this user an admin?'), + + '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'), + ), + 'primary key' => array('group_id', 'profile_id'), + 'foreign keys' => array( + 'group_member_group_id_fkey' => array('user_group', array('group_id' => 'id')), + 'group_member_profile_id_fkey' => array('profile', array('profile_id' => 'id')), + ), + 'indexes' => array( + // @fixme probably we want a (profile_id, created) index here? + 'group_member_profile_id_idx' => array('profile_id'), + 'group_member_created_idx' => array('created'), + ), + ); + } + function pkeyGet($kv) { return Memcached_DataObject::pkeyGet('Group_member', $kv); diff --git a/db/core.php b/db/core.php index dd5c9a7878..5841de43cf 100644 --- a/db/core.php +++ b/db/core.php @@ -65,6 +65,7 @@ $classes = array('Profile', 'User_group', 'Related_group', 'Group_inbox', + 'Group_member', 'File', 'File_oembed', 'File_redirection',