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

buddypress-trac noreply at wordpress.org
Sat Apr 4 17:10:48 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                 |  Resolution:
 Keywords:  2nd-opinion           |
----------------------------------+----------------------------------

Comment (by johnjamesjacoby):

 A slightly more optimized schema might look something like:

 {{{
 CREATE TABLE {$bp_prefix}bp_xprofile_fields (
         id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
         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 tinyint(1) NOT NULL DEFAULT '0',
         is_signup tinyint(1) NOT NULL DEFAULT '0',
         order bigint(20) NOT NULL DEFAULT '0',
         order_by varchar(15) NOT NULL DEFAULT '',
         can_delete tinyint(1) NOT NULL DEFAULT '1',
         KEY parent_id (parent_id),
         KEY order (order),
         KEY is_signup (is_signup),
         KEY is_required (is_required)
 )
 }}}

 A few other thoughts:
 * We could move visibility out of field meta
 * We could eliminate the `bp_xprofile_groups` table, and have them instead
 be a field type `group`

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


More information about the buddypress-trac mailing list