SourceForge Logo
Database Framework

This page contains a SQL dump (by phpMyAdmin). We added short descriptions of the tables and it's fields. You can copy and paste the text in phpMyAdmin to create all the tables needed by GPB.
GPB uses the following tables:

#------------------------------------------------------------------------------#
# gpb_cat                                                                      #
#------------------------------------------------------------------------------#
# Table that contains all main categories of the gpb forum.                    #
#------------------------------------------------------------------------------#
# cid                ID for the main categories (primary key)                  #
# ctitle             Name of each category                                     #
# pos                Position of the category in the tree structure            #
#------------------------------------------------------------------------------#
CREATE TABLE gpb_cat (
  cid int(11) NOT NULL auto_increment,
  ctitle varchar(64) NOT NULL default '',
  pos int(11) NOT NULL default '0',
  PRIMARY KEY  (cid)
) TYPE=MyISAM;


#------------------------------------------------------------------------------#
# gpb_subcat                                                                   #
#------------------------------------------------------------------------------#
# Table that contains all subcategories of the gpb forum.                      #
#------------------------------------------------------------------------------#
# sid                Index for the subcategories (primary key)                 #
# cid                ID of the main category that contains this subcategory    #
# moderator_only     "1" if subcat is only accessable by admins and modderators#
# title              Name of the subcategory                                   #
# description        Description of the subcategory                            #
# abbrev             Abbreviation of the subcategory (max 4 chars)             #
# num_topics         Number of topics in the subcategory                       #
# num_posts          Number of posts in the subcategory                        #
# last_pid           pid of the last post in the subcategory                   #
# moderator_uid      uid of the modderator                                     #
# pos                Position of the subcategory in the tree structure         #
#------------------------------------------------------------------------------#
CREATE TABLE gpb_subcat (
  sid int(11) NOT NULL auto_increment,
  cid int(11) NOT NULL default '0',
  moderator_only tinyint(4) NOT NULL default '0',
  stitle varchar(64) NOT NULL default '',
  description text,
  abbrev varchar(4) default NULL,
  num_topics int(11) NOT NULL default '0',
  num_posts int(11) NOT NULL default '0',
  last_pid int(11) NOT NULL default '0',
  moderator_uid int(11) NOT NULL default '0',
  pos int(11) NOT NULL default '0',
  PRIMARY KEY  (sid)
) TYPE=MyISAM;


#------------------------------------------------------------------------------#
# gpb_topic                                                                    #
#------------------------------------------------------------------------------#
# Table that contains all topics.                                              #
#------------------------------------------------------------------------------#
# tid                ID for the topics (primary key)                           #
# sid                Index of the subcategory containing the topic             #
# uid                The ID of the topic poster                                #
# ttitle             Name of the topic                                         #
# num_posts          Number of posts in the topic                              #
# start_timestamp    Timestamp of the topic start                              #
# icon               Icon  of the topic                                        #
# mail_on_reply     If "1" a mail wille be send on every reply                 #
# last_pid           pid of the last posted post in the topic                  #
# closed             "1" if a modderator closed the topic                      #
#------------------------------------------------------------------------------#
CREATE TABLE gpb_topic (
  tid int(11) NOT NULL auto_increment,
  sid int(11) NOT NULL default '0',
  uid int(11) NOT NULL default '0',
  ttitle varchar(64) NOT NULL default '',
  num_posts int(11) NOT NULL default '0',
  start_timestamp int(11) NOT NULL default '0',
  icon tinyint(2) NOT NULL default '1',
  mail_on_reply tinyint(1) NOT NULL default '0',
  last_pid int(11) NOT NULL default '0',
  closed tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (tid)
) TYPE=MyISAM;


#------------------------------------------------------------------------------#
# gpb_post                                                                     #
#------------------------------------------------------------------------------#
# Table that contains all posts.                                               #
#------------------------------------------------------------------------------#
# pid               ID for the posts (primary key)                             #
# tid               Index of the topic containing the post                     #
# uid               uid of the user who posts the post                         #
# text              Text of post                                               #
# timestamp         Timestamp the post is posted                               #
# first_post        If "1" the post is the first one (so it's the topic)       #
# icon              Icon that belongs to the post                              #
# enable_smilies    "1" if smilies are allowed in the post                     #
#------------------------------------------------------------------------------#
CREATE TABLE gpb_post (
  pid int(11) NOT NULL auto_increment,
  tid int(11) NOT NULL default '0',
  uid int(11) NOT NULL default '0',
  text text NOT NULL,
  timestamp int(11) NOT NULL default '0',
  first_post tinyint(4) NOT NULL default '0',
  icon tinyint(2) NOT NULL default '1',
  enable_smilies tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (pid)
) TYPE=MyISAM;


#------------------------------------------------------------------------------#
# gpb_user                                                                     #
#------------------------------------------------------------------------------#
# Table that contains all user properties                                      #
#------------------------------------------------------------------------------#
# uid               ID of the user (primary key)                               #
# md5passwd         The (encrypted) password                                   #
# username          Username that identifies the user                          #
# realname          The realname of the user                                   #
# email             E-mail address of the user                                 #
# homepage          URL of the homepage of the user                            #
# icq_num           ICQ number                                                 #
# phone_num         Phone number                                               #
# birthday          Birthday                                                   #
# status            Inactive, Member, Modderator or Administrator              #
# reg_timestamp     Timestamp the user registered                              #
# occupation        Occupation of the user                                     #
# interests         Interests of the user                                      #
# residence         Location (Village/Country/whatever) of the user            #
# signature         Signature added to every post by the user                  #
# subtitle          Subtitle of the user                                       #
# photo_url         URL to a photograph                                        #
# avatar_url        URL to the antavar                                         #
# language          Language code (ie "en" or "nl")                            #
# theme             Themename which the user uses by default                   #
# show_days         Number of days where topics must be shown                  #
# email_visible     "1" if the E-mail address is world-readable                #
# admin_mail        "1" if admins are allowed to send the user mail            #
# avatar_enable    "1" if antavar is added to every post by the user           #
# num_posts         Number of posts posted by the user                         #
# last_pid          pid of the users last post                                 #
#------------------------------------------------------------------------------#
CREATE TABLE gpb_user (
  uid int(11) NOT NULL auto_increment,
  md5passwd varchar(32) NOT NULL default '0',
  username varchar(32) NOT NULL default '',
  realname varchar(64) default NULL,
  email varchar(64) NOT NULL default '',
  homepage varchar(128) default NULL,
  icq_num int(11) default '0',
  phone_num varchar(14) default '0',
  birthday date default '0000-00-00',
  status tinyint(2) NOT NULL default '1',
  reg_timestamp int(11) NOT NULL default '0',
  occupation varchar(64) default NULL,
  interests varchar(64) default NULL,
  residence varchar(32) default NULL,
  signature varchar(255) default NULL,
  subtitle varchar(32) default NULL,
  photo_url varchar(128) default NULL,
  avatar_url varchar(128) default NULL,
  language char(2) default 'en',
  theme varchar(32) default 'simple',
  show_days int(11) default '0',
  email_visible tinyint(4) default '0',
  admin_mail tinyint(4) default '0',
  avatar_enable tinyint(4) default '0',
  num_posts int(11) default '0',
  last_pid int(11) default '0',
  PRIMARY KEY  (uid),
  UNIQUE KEY email (email),
  UNIQUE KEY username (username)
) TYPE=MyISAM;