[buddypress-trac] [BuddyPress Trac] #6350: XProfile field database schema

buddypress-trac noreply at wordpress.org
Sat Apr 4 17:06:41 UTC 2015


#6350: XProfile field database schema
----------------------------------+---------------------------------
 Reporter:  johnjamesjacoby       |      Owner:
     Type:  defect (bug)          |     Status:  new
 Priority:  low                   |  Milestone:  Under Consideration
Component:  Component - XProfile  |    Version:  1.0
 Severity:  minor                 |   Keywords:  2nd-opinion
----------------------------------+---------------------------------
 BuddyPress's XProfile database schema is... weird.

 {{{
 CREATE TABLE {$bp_prefix}bp_xprofile_fields (
         id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
         group_id bigint(20) unsigned NOT NULL,
         parent_id bigint(20) unsigned NOT NULL,
         type varchar(150) NOT NULL,
         name varchar(150) NOT NULL,
         description longtext NOT NULL,
         is_required tinyint(1) NOT NULL DEFAULT '0',
         is_default_option tinyint(1) NOT NULL DEFAULT '0',
         field_order bigint(20) NOT NULL DEFAULT '0',
         option_order bigint(20) NOT NULL DEFAULT '0',
         order_by varchar(15) NOT NULL DEFAULT '',
         can_delete tinyint(1) NOT NULL DEFAULT '1',
         KEY group_id (group_id),
         KEY parent_id (parent_id),
         KEY field_order (field_order),
         KEY can_delete (can_delete),
         KEY is_required (is_required)
 )
 }}}

 A few thoughts from staring at this too long:
 * Field options are just fields with a `parent_id`
 * Fields are just fields with a `group_id`
 * Groups are just fields with children

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6350>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list