+
+ public static function schemaDef()
+ {
+ return array(
+ // @fixme description for related_group?
+ 'fields' => array(
+ 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to user_group'),
+ 'related_group_id' => array('type' => 'int', 'not null' => true, 'description' => 'foreign key to user_group'),
+
+ 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
+ ),
+ 'primary key' => array('group_id', 'related_group_id'),
+ 'foreign keys' => array(
+ 'related_group_group_id_fkey' => array('user_group', array('group_id' => 'id')),
+ 'related_group_related_group_id_fkey' => array('user_group', array('related_group_id' => 'id')),
+ ),
+ );
+ }