b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 2.4) [ class tree: main ] [ index: main ] [ all elements ]

Source for file _db_schema.inc.php

Documentation is available at _db_schema.inc.php

  1. <?php
  2. /**
  3.  * This file holds the b2evo database scheme.
  4.  *
  5.  * @version $Id: _db_schema.inc.php,v 1.78.4.1 2008/02/09 03:03:26 fplanque Exp $
  6.  */
  7. if!defined('EVO_MAIN_INIT') ) die'Please, do not access this page directly.' );
  8.  
  9. /**
  10.  * The b2evo database scheme.
  11.  *
  12.  * This gets updated through {@link db_delta()} which generates the queries needed to get
  13.  * to this scheme.
  14.  *
  15.  * Please see {@link db_delta()} for things to take care of.
  16.  *
  17.  * @global array 
  18.  */
  19. global $schema_queries;
  20.  
  21. $schema_queries array(
  22.  
  23.     'T_groups' => array(
  24.         'Creating table for Groups',
  25.         "CREATE TABLE T_groups (
  26.             grp_ID int(11) NOT NULL auto_increment,
  27.             grp_name varchar(50) NOT NULL default '',
  28.             grp_perm_admin enum('none','hidden','visible') NOT NULL default 'visible',
  29.             grp_perm_blogs enum('user','viewall','editall') NOT NULL default 'user',
  30.             grp_perm_bypass_antispam         TINYINT(1) NOT NULL DEFAULT 0,
  31.             grp_perm_xhtmlvalidation         VARCHAR(10) NOT NULL default 'always',
  32.             grp_perm_xhtmlvalidation_xmlrpc  VARCHAR(10) NOT NULL default 'always',
  33.             grp_perm_xhtml_css_tweaks        TINYINT(1) NOT NULL DEFAULT 0,
  34.       grp_perm_xhtml_iframes           TINYINT(1) NOT NULL DEFAULT 0,
  35.       grp_perm_xhtml_javascript        TINYINT(1) NOT NULL DEFAULT 0,
  36.             grp_perm_xhtml_objects           TINYINT(1) NOT NULL DEFAULT 0,
  37.             grp_perm_stats enum('none','user','view','edit') NOT NULL default 'none',
  38.             grp_perm_spamblacklist enum('none','view','edit') NOT NULL default 'none',
  39.             grp_perm_options enum('none','view','edit') NOT NULL default 'none',
  40.             grp_perm_users enum('none','view','edit') NOT NULL default 'none',
  41.             grp_perm_templates TINYINT NOT NULL DEFAULT 0,
  42.             grp_perm_files enum('none','view','add','edit','all') NOT NULL default 'none',
  43.             PRIMARY KEY grp_ID (grp_ID)
  44.         )" ),
  45.  
  46.     'T_settings' => array(
  47.         'Creating table for Settings',
  48.         "CREATE TABLE T_settings (
  49.             set_name VARCHAR( 30 ) NOT NULL ,
  50.             set_value VARCHAR( 255 ) NULL ,
  51.             PRIMARY KEY ( set_name )
  52.         )" ),
  53.  
  54.     'T_global__cache' => array(
  55.         'Creating table for Caches',
  56.         "CREATE TABLE T_global__cache (
  57.             cach_name VARCHAR( 30 ) NOT NULL ,
  58.             cach_cache MEDIUMBLOB NULL ,
  59.             PRIMARY KEY ( cach_name )
  60.         )" ),
  61.  
  62.     'T_users' => array(
  63.         'Creating table for Users',
  64.         "CREATE TABLE T_users (
  65.             user_ID int(11) unsigned NOT NULL auto_increment,
  66.             user_login varchar(20) NOT NULL,
  67.             user_pass CHAR(32) NOT NULL,
  68.             user_firstname varchar(50) NULL,
  69.             user_lastname varchar(50) NULL,
  70.             user_nickname varchar(50) NULL,
  71.             user_icq int(11) unsigned NULL,
  72.             user_email varchar(255) NOT NULL,
  73.             user_url varchar(255) NULL,
  74.             user_ip varchar(15) NULL,
  75.             user_domain varchar(200) NULL,
  76.             user_browser varchar(200) NULL,
  77.             dateYMDhour datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  78.             user_level int unsigned DEFAULT 0 NOT NULL,
  79.             user_aim varchar(50) NULL,
  80.             user_msn varchar(100) NULL,
  81.             user_yim varchar(50) NULL,
  82.             user_locale varchar(20) DEFAULT 'en-EU' NOT NULL,
  83.             user_idmode varchar(20) NOT NULL DEFAULT 'login',
  84.             user_allow_msgform TINYINT NOT NULL DEFAULT '1',
  85.             user_notify tinyint(1) NOT NULL default 1,
  86.             user_showonline tinyint(1) NOT NULL default 1,
  87.             user_grp_ID int(4) NOT NULL default 1,
  88.             user_validated TINYINT(1) NOT NULL DEFAULT 0,
  89.             PRIMARY KEY user_ID (user_ID),
  90.             UNIQUE user_login (user_login),
  91.             KEY user_grp_ID (user_grp_ID)
  92.         )" ),
  93.  
  94.     'T_skins__skin' => array(
  95.         'Creating table for installed skins',
  96.         "CREATE TABLE T_skins__skin (
  97.                 skin_ID      int(10) unsigned      NOT NULL auto_increment,
  98.                 skin_name    varchar(32)           NOT NULL,
  99.                 skin_type    enum('normal','feed') NOT NULL default 'normal',
  100.                 skin_folder  varchar(32)           NOT NULL,
  101.                 PRIMARY KEY skin_ID (skin_ID),
  102.                 UNIQUE skin_folder( skin_folder ),
  103.                 KEY skin_name( skin_name )
  104.             )" ),
  105.  
  106.     'T_skins__container' => array(
  107.         'Creating table for skin containers',
  108.         "CREATE TABLE T_skins__container (
  109.                 sco_skin_ID   int(10) unsigned      NOT NULL,
  110.                 sco_name      varchar(40)           NOT NULL,
  111.                 PRIMARY KEY (sco_skin_ID, sco_name)
  112.             )" ),
  113.  
  114.     'T_blogs' => array(
  115.         'Creating table for Blogs',
  116.         "CREATE TABLE T_blogs (
  117.             blog_ID              int(11) unsigned NOT NULL auto_increment,
  118.             blog_shortname       varchar(12) NULL default '',
  119.             blog_name            varchar(50) NOT NULL default '',
  120.             blog_owner_user_ID   int(11) unsigned NOT NULL default 1,
  121.             blog_advanced_perms  TINYINT(1) NOT NULL default 0,
  122.             blog_tagline         varchar(250) NULL default '',
  123.             blog_description     varchar(250) NULL default '',
  124.             blog_longdesc        TEXT NULL DEFAULT NULL,
  125.             blog_locale          VARCHAR(20) NOT NULL DEFAULT 'en-EU',
  126.             blog_access_type     VARCHAR(10) NOT NULL DEFAULT 'index.php',
  127.             blog_siteurl         varchar(120) NOT NULL default '',
  128.             blog_urlname         VARCHAR(255) NOT NULL DEFAULT 'urlname',
  129.             blog_notes           TEXT NULL,
  130.             blog_keywords        tinytext,
  131.             blog_allowcomments   VARCHAR(20) NOT NULL default 'post_by_post',
  132.             blog_allowtrackbacks TINYINT(1) NOT NULL default 0,
  133.             blog_allowblogcss    TINYINT(1) NOT NULL default 1,
  134.             blog_allowusercss    TINYINT(1) NOT NULL default 1,
  135.             blog_skin_ID         INT(10) UNSIGNED NOT NULL DEFAULT 1,
  136.             blog_in_bloglist     TINYINT(1) NOT NULL DEFAULT 1,
  137.             blog_links_blog_ID   INT(11) NULL DEFAULT NULL,
  138.             blog_commentsexpire  INT(4) NOT NULL DEFAULT 0,
  139.             blog_media_location  ENUM( 'default', 'subdir', 'custom', 'none' ) DEFAULT 'default' NOT NULL,
  140.             blog_media_subdir    VARCHAR( 255 ) NULL,
  141.             blog_media_fullpath  VARCHAR( 255 ) NULL,
  142.             blog_media_url       VARCHAR( 255 ) NULL,
  143.             blog_UID             VARCHAR(20),
  144.             PRIMARY KEY blog_ID (blog_ID),
  145.             UNIQUE KEY blog_urlname (blog_urlname)
  146.         )" ),
  147.  
  148.     'T_coll_settings' => array(
  149.         'Creating collection settings table',
  150.         "CREATE TABLE T_coll_settings (
  151.             cset_coll_ID INT(11) UNSIGNED NOT NULL,
  152.             cset_name    VARCHAR( 30 ) NOT NULL,
  153.             cset_value   VARCHAR( 255 ) NULL,
  154.             PRIMARY KEY ( cset_coll_ID, cset_name )
  155.         )" ),
  156.  
  157.     'T_widget' => array(
  158.         'Creating components table',
  159.         "CREATE TABLE T_widget (
  160.             wi_ID                    INT(10) UNSIGNED auto_increment,
  161.             wi_coll_ID    INT(11) UNSIGNED NOT NULL,
  162.             wi_sco_name   VARCHAR( 40 ) NOT NULL,
  163.             wi_order            INT(10) UNSIGNED NOT NULL,
  164.             wi_type       ENUM( 'core', 'plugin' ) NOT NULL DEFAULT 'core',
  165.             wi_code       VARCHAR(32) NOT NULL,
  166.             wi_params     TEXT NULL,
  167.             PRIMARY KEY ( wi_ID ),
  168.             UNIQUE wi_order( wi_coll_ID, wi_sco_name, wi_order )
  169.         )" ),
  170.  
  171.     'T_categories' => array(
  172.         'Creating table for Categories',
  173.         "CREATE TABLE T_categories (
  174.             cat_ID int(11) unsigned NOT NULL auto_increment,
  175.             cat_parent_ID int(11) unsigned NULL,
  176.             cat_name tinytext NOT NULL,
  177.             cat_urlname varchar(255) NOT NULL,
  178.             cat_blog_ID int(11) unsigned NOT NULL default 2,
  179.             cat_description VARCHAR(250) NULL DEFAULT NULL,
  180.             cat_longdesc TEXT NULL DEFAULT NULL,
  181.             cat_icon VARCHAR(30) NULL DEFAULT NULL,
  182.             PRIMARY KEY cat_ID (cat_ID),
  183.             UNIQUE cat_urlname( cat_urlname ),
  184.             KEY cat_blog_ID (cat_blog_ID),
  185.             KEY cat_parent_ID (cat_parent_ID)
  186.         )" ),
  187.  
  188.     'T_items__item' => array(
  189.         'Creating table for Posts',
  190.         "CREATE TABLE T_items__item (
  191.             post_ID                     int(11) unsigned NOT NULL auto_increment,
  192.             post_parent_ID              int(11) unsigned NULL,
  193.             post_creator_user_ID        int(11) unsigned NOT NULL,
  194.             post_lastedit_user_ID       int(11) unsigned NULL,
  195.             post_assigned_user_ID       int(11) unsigned NULL,
  196.             post_datestart              DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',
  197.             post_datedeadline           datetime NULL,
  198.             post_datecreated            datetime NULL,
  199.             post_datemodified           DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',
  200.             post_status                 enum('published','deprecated','protected','private','draft','redirected') NOT NULL default 'published',
  201.             post_pst_ID                 int(11) unsigned NULL,
  202.             post_ptyp_ID                int(11) unsigned NULL,
  203.             post_locale                 VARCHAR(20) NOT NULL DEFAULT 'en-EU',
  204.             post_content                MEDIUMTEXT NULL,
  205.             post_excerpt                text NULL,
  206.             post_title                  text NOT NULL,
  207.             post_urltitle               VARCHAR(50) NULL DEFAULT NULL,
  208.             post_url                    VARCHAR(255) NULL DEFAULT NULL,
  209.             post_main_cat_ID            int(11) unsigned NOT NULL,
  210.             post_notifications_status   ENUM('noreq','todo','started','finished') NOT NULL DEFAULT 'noreq',
  211.             post_notifications_ctsk_ID  INT(10) unsigned NULL DEFAULT NULL,
  212.             post_views                  INT(11) UNSIGNED NOT NULL DEFAULT 0,
  213.             post_wordcount              int(11) default NULL,
  214.             post_comment_status         ENUM('disabled', 'open', 'closed') NOT NULL DEFAULT 'open',
  215.             post_commentsexpire         DATETIME DEFAULT NULL,
  216.             post_renderers              TEXT NOT NULL,
  217.             post_priority               int(11) unsigned null,
  218.             post_order                  float NULL,
  219.             post_featured               tinyint(1) NOT NULL DEFAULT 0,
  220.             PRIMARY KEY post_ID( post_ID ),
  221.             UNIQUE post_urltitle( post_urltitle ),
  222.             INDEX post_datestart( post_datestart ),
  223.             INDEX post_main_cat_ID( post_main_cat_ID ),
  224.             INDEX post_creator_user_ID( post_creator_user_ID ),
  225.             INDEX post_status( post_status ),
  226.             INDEX post_parent_ID( post_parent_ID ),
  227.             INDEX post_assigned_user_ID( post_assigned_user_ID ),
  228.             INDEX post_ptyp_ID( post_ptyp_ID ),
  229.             INDEX post_pst_ID( post_pst_ID ),
  230.             INDEX post_order( post_order )
  231.         )" ),
  232.  
  233.     'T_postcats' => array(
  234.         'Creating table for Categories-to-Posts relationships',
  235.         "CREATE TABLE T_postcats (
  236.             postcat_post_ID int(11) unsigned NOT NULL,
  237.             postcat_cat_ID int(11) unsigned NOT NULL,
  238.             PRIMARY KEY postcat_pk (postcat_post_ID,postcat_cat_ID),
  239.             UNIQUE catpost ( postcat_cat_ID, postcat_post_ID )
  240.         )" ),
  241.  
  242.     'T_comments' => array(    // Note: pingbacks no longer supported, but previous pingbacks are to be preserved in the DB
  243.         'Creating table for Comments',
  244.         "CREATE TABLE T_comments (
  245.             comment_ID        int(11) unsigned NOT NULL auto_increment,
  246.             comment_post_ID   int(11) unsigned NOT NULL default '0',
  247.             comment_type enum('comment','linkback','trackback','pingback') NOT NULL default 'comment',
  248.             comment_status ENUM('published','deprecated','protected','private','draft','redirected') DEFAULT 'published' NOT NULL,
  249.             comment_author_ID int unsigned NULL default NULL,
  250.             comment_author varchar(100) NULL,
  251.             comment_author_email varchar(255) NULL,
  252.             comment_author_url varchar(255) NULL,
  253.             comment_author_IP  varchar(23) NOT NULL default '',
  254.             comment_date       datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  255.             comment_content    text NOT NULL,
  256.             comment_rating     TINYINT(1) NULL DEFAULT NULL,
  257.             comment_featured   TINYINT(1) NOT NULL DEFAULT 0,
  258.             comment_nofollow   TINYINT(1) NOT NULL DEFAULT 1,
  259.             comment_karma      INT(11) NOT NULL default '0',
  260.             comment_spam_karma TINYINT NULL,
  261.             comment_allow_msgform TINYINT NOT NULL DEFAULT '0',
  262.             PRIMARY KEY comment_ID (comment_ID),
  263.             KEY comment_post_ID (comment_post_ID),
  264.             KEY comment_date (comment_date),
  265.             KEY comment_type (comment_type)
  266.         )" ),
  267.  
  268.     'T_locales' => array(
  269.         'Creating table for Locales',
  270.         "CREATE TABLE T_locales (
  271.             loc_locale varchar(20) NOT NULL default '',
  272.             loc_charset varchar(15) NOT NULL default 'iso-8859-1',
  273.             loc_datefmt varchar(20) NOT NULL default 'y-m-d',
  274.             loc_timefmt varchar(20) NOT NULL default 'H:i:s',
  275.             loc_startofweek TINYINT UNSIGNED NOT NULL DEFAULT 1,
  276.             loc_name varchar(40) NOT NULL default '',
  277.             loc_messages varchar(20) NOT NULL default '',
  278.             loc_priority tinyint(4) UNSIGNED NOT NULL default '0',
  279.             loc_enabled tinyint(4) NOT NULL default '1',
  280.             PRIMARY KEY loc_locale( loc_locale )
  281.         ) COMMENT='saves available locales'
  282.         " ),
  283.  
  284.     'T_antispam' => array(
  285.         'Creating table for Antispam Blacklist',
  286.         "CREATE TABLE T_antispam (
  287.             aspm_ID bigint(11) NOT NULL auto_increment,
  288.             aspm_string varchar(80) NOT NULL,
  289.             aspm_source enum( 'local','reported','central' ) NOT NULL default 'reported',
  290.             PRIMARY KEY aspm_ID (aspm_ID),
  291.             UNIQUE aspm_string (aspm_string)
  292.         )" ),
  293.  
  294.     'T_sessions' => array(
  295.         'Creating table for active sessions',
  296.         "CREATE TABLE T_sessions (
  297.             sess_ID        INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  298.             sess_key       CHAR(32) NULL,
  299.             sess_lastseen  DATETIME NOT NULL,
  300.             sess_ipaddress VARCHAR(15) NOT NULL DEFAULT '',
  301.             sess_user_ID   INT(10) DEFAULT NULL,
  302.             sess_data      MEDIUMBLOB DEFAULT NULL,
  303.             PRIMARY KEY( sess_ID )
  304.         )" )// NOTE: sess_lastseen is only relevant/used by Sessions class (+ stats) and results in a quite large index (file size wise)
  305.         // NOTE: sess_data is (MEDIUM)BLOB because e.g. serialize() does not completely convert binary data to text
  306.  
  307.     'T_usersettings' => array(
  308.         'Creating user settings table',
  309.         "CREATE TABLE T_usersettings (
  310.             uset_user_ID INT(11) UNSIGNED NOT NULL,
  311.             uset_name    VARCHAR( 30 ) NOT NULL,
  312.             uset_value   VARCHAR( 255 ) NULL,
  313.             PRIMARY KEY ( uset_user_ID, uset_name )
  314.         )" ),
  315.  
  316.     'T_items__prerendering' => array(
  317.         'Creating item prerendering cache table',
  318.         'CREATE TABLE T_items__prerendering(
  319.             itpr_itm_ID                   INT(11) UNSIGNED NOT NULL,
  320.             itpr_format                   ENUM(\'htmlbody\', \'entityencoded\', \'xml\', \'text\') NOT NULL,
  321.             itpr_renderers                TEXT NOT NULL,
  322.             itpr_content_prerendered      MEDIUMTEXT NULL,
  323.             itpr_datemodified             TIMESTAMP NOT NULL,
  324.             PRIMARY KEY (itpr_itm_ID, itpr_format)
  325.         )' ),
  326.  
  327.     'T_items__status' => array(
  328.         'Creating table for Post Statuses',
  329.         "CREATE TABLE T_items__status (
  330.             pst_ID   int(11) unsigned not null AUTO_INCREMENT,
  331.             pst_name varchar(30)      not null,
  332.             primary key ( pst_ID )
  333.         )" ),
  334.  
  335.     'T_items__type' => array(
  336.         'Creating table for Post Types',
  337.         "CREATE TABLE T_items__type (
  338.             ptyp_ID   int(11) unsigned not null AUTO_INCREMENT,
  339.             ptyp_name varchar(30)      not null,
  340.             primary key (ptyp_ID)
  341.         )" ),
  342.  
  343.     'T_items__tag' => array(
  344.         'Creating table for Tags',
  345.         "CREATE TABLE T_items__tag (
  346.             tag_ID   int(11) unsigned not null AUTO_INCREMENT,
  347.             tag_name varchar(50)      not null,
  348.             primary key (tag_ID),
  349.             UNIQUE tag_name( tag_name )
  350.         )" ),
  351.  
  352.     'T_items__itemtag' => array(
  353.         'Creating table for Post-to-Tag relationships',
  354.         "CREATE TABLE T_items__itemtag (
  355.             itag_itm_ID int(11) unsigned NOT NULL,
  356.             itag_tag_ID int(11) unsigned NOT NULL,
  357.             PRIMARY KEY (itag_itm_ID, itag_tag_ID),
  358.             UNIQUE tagitem ( itag_tag_ID, itag_itm_ID )
  359.         )" ),
  360.  
  361.     'T_files' => array(
  362.         'Creating table for File Meta Data',
  363.         "CREATE TABLE T_files (
  364.             file_ID        int(11) unsigned  not null AUTO_INCREMENT,
  365.             file_root_type enum('absolute','user','group','collection','skins') not null default 'absolute',
  366.             file_root_ID   int(11) unsigned  not null default 0,
  367.             file_path      varchar(255)      not null default '',
  368.             file_title     varchar(255),
  369.             file_alt       varchar(255),
  370.             file_desc      text,
  371.             primary key (file_ID),
  372.             unique file (file_root_type, file_root_ID, file_path)
  373.         )" ),
  374.  
  375.     'T_basedomains' => array(
  376.         'Creating table for base domains',
  377.         "CREATE TABLE T_basedomains (
  378.             dom_ID     INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  379.             dom_name   VARCHAR(250) NOT NULL DEFAULT '',
  380.             dom_status ENUM('unknown','whitelist','blacklist') NOT NULL DEFAULT 'unknown',
  381.             dom_type   ENUM('unknown','normal','searcheng','aggregator') NOT NULL DEFAULT 'unknown',
  382.             PRIMARY KEY     (dom_ID),
  383.             UNIQUE dom_name (dom_name),
  384.             INDEX dom_type  (dom_type)
  385.         )" ),
  386.  
  387.     'T_useragents' => array(
  388.         'Creating table for user agents',
  389.         "CREATE TABLE T_useragents (
  390.             agnt_ID        INT UNSIGNED NOT NULL AUTO_INCREMENT,
  391.             agnt_signature VARCHAR(250) NOT NULL,
  392.             agnt_type      ENUM('rss','robot','browser','unknown') DEFAULT 'unknown' NOT NULL ,
  393.             PRIMARY KEY (agnt_ID),
  394.             INDEX agnt_type ( agnt_type )
  395.         )" ),
  396.  
  397.     'T_hitlog' => array(
  398.         'Creating table for Hit-Logs',
  399.         "CREATE TABLE T_hitlog (
  400.             hit_ID             INT(11) NOT NULL AUTO_INCREMENT,
  401.             hit_sess_ID        INT UNSIGNED,
  402.             hit_datetime       DATETIME NOT NULL,
  403.             hit_uri            VARCHAR(250) DEFAULT NULL,
  404.             hit_referer_type   ENUM('search','blacklist','spam','referer','direct','self','admin') NOT NULL,
  405.             hit_referer        VARCHAR(250) DEFAULT NULL,
  406.             hit_referer_dom_ID INT UNSIGNED DEFAULT NULL,
  407.             hit_blog_ID        int(11) UNSIGNED NULL DEFAULT NULL,
  408.             hit_remote_addr    VARCHAR(40) DEFAULT NULL,
  409.             hit_agnt_ID        INT UNSIGNED NULL,
  410.             PRIMARY KEY         (hit_ID),
  411.             INDEX hit_agnt_ID        ( hit_agnt_ID ),
  412.             INDEX hit_blog_ID        ( hit_blog_ID ),
  413.             INDEX hit_uri            ( hit_uri ),
  414.             INDEX hit_referer_dom_ID ( hit_referer_dom_ID )
  415.         )" ),
  416.  
  417.     'T_subscriptions' => array(
  418.         'Creating table for subscriptions',
  419.         "CREATE TABLE T_subscriptions (
  420.             sub_coll_ID     int(11) unsigned    not null,
  421.             sub_user_ID     int(11) unsigned    not null,
  422.             sub_items       tinyint(1)          not null,
  423.             sub_comments    tinyint(1)          not null,
  424.             primary key (sub_coll_ID, sub_user_ID)
  425.         )" ),
  426.  
  427.     'T_coll_user_perms' => array(
  428.         'Creating table for Blog-User permissions',
  429.         "CREATE TABLE T_coll_user_perms (
  430.             bloguser_blog_ID           int(11) unsigned NOT NULL default 0,
  431.             bloguser_user_ID           int(11) unsigned NOT NULL default 0,
  432.             bloguser_ismember          tinyint NOT NULL default 0,
  433.             bloguser_perm_poststatuses set('published','deprecated','protected','private','draft','redirected') NOT NULL default '',
  434.             bloguser_perm_edit         ENUM('no','own','lt','le','all','redirected') NOT NULL default 'no',
  435.             bloguser_perm_delpost      tinyint NOT NULL default 0,
  436.             bloguser_perm_comments     tinyint NOT NULL default 0,
  437.             bloguser_perm_cats         tinyint NOT NULL default 0,
  438.             bloguser_perm_properties   tinyint NOT NULL default 0,
  439.             bloguser_perm_admin        tinyint NOT NULL default 0,
  440.             bloguser_perm_media_upload tinyint NOT NULL default 0,
  441.             bloguser_perm_media_browse tinyint NOT NULL default 0,
  442.             bloguser_perm_media_change tinyint NOT NULL default 0,
  443.             PRIMARY KEY bloguser_pk (bloguser_blog_ID,bloguser_user_ID)
  444.         )" ),
  445.  
  446.     'T_coll_group_perms' => array(
  447.         'Creating table for blog-group permissions',
  448.         "CREATE TABLE T_coll_group_perms (
  449.             bloggroup_blog_ID           int(11) unsigned NOT NULL default 0,
  450.             bloggroup_group_ID          int(11) unsigned NOT NULL default 0,
  451.             bloggroup_ismember          tinyint NOT NULL default 0,
  452.             bloggroup_perm_poststatuses set('published','deprecated','protected','private','draft','redirected') NOT NULL default '',
  453.             bloggroup_perm_edit         ENUM('no','own','lt','le','all','redirected') NOT NULL default 'no',
  454.             bloggroup_perm_delpost      tinyint NOT NULL default 0,
  455.             bloggroup_perm_comments     tinyint NOT NULL default 0,
  456.             bloggroup_perm_cats         tinyint NOT NULL default 0,
  457.             bloggroup_perm_properties   tinyint NOT NULL default 0,
  458.             bloggroup_perm_admin        tinyint NOT NULL default 0,
  459.             bloggroup_perm_media_upload tinyint NOT NULL default 0,
  460.             bloggroup_perm_media_browse tinyint NOT NULL default 0,
  461.             bloggroup_perm_media_change tinyint NOT NULL default 0,
  462.             PRIMARY KEY bloggroup_pk (bloggroup_blog_ID,bloggroup_group_ID)
  463.         )" ),
  464.  
  465.     'T_links' => array(
  466.         'Creating table for Post Links',
  467.         "CREATE TABLE T_links (
  468.             link_ID               int(11) unsigned  not null AUTO_INCREMENT,
  469.             link_datecreated      datetime          not null,
  470.             link_datemodified     datetime          not null,
  471.             link_creator_user_ID  int(11) unsigned  not null,
  472.             link_lastedit_user_ID int(11) unsigned  not null,
  473.             link_itm_ID           int(11) unsigned  NOT NULL,
  474.             link_dest_itm_ID      int(11) unsigned  NULL,
  475.             link_file_ID          int(11) unsigned  NULL,
  476.             link_ltype_ID         int(11) unsigned  NOT NULL default 1,
  477.             link_external_url     VARCHAR(255)      NULL,
  478.             link_title            TEXT              NULL,
  479.             PRIMARY KEY (link_ID),
  480.             INDEX link_itm_ID( link_itm_ID ),
  481.             INDEX link_dest_itm_ID (link_dest_itm_ID),
  482.             INDEX link_file_ID (link_file_ID)
  483.         )" ),
  484.  
  485.     'T_filetypes' => array(
  486.         'Creating table for file types',
  487.         'CREATE TABLE T_filetypes (
  488.             ftyp_ID int(11) unsigned NOT NULL auto_increment,
  489.             ftyp_extensions varchar(30) NOT NULL,
  490.             ftyp_name varchar(30) NOT NULL,
  491.             ftyp_mimetype varchar(50) NOT NULL,
  492.             ftyp_icon varchar(20) default NULL,
  493.             ftyp_viewtype varchar(10) NOT NULL,
  494.             ftyp_allowed tinyint(1) NOT NULL default 0,
  495.             PRIMARY KEY (ftyp_ID)
  496.         )' ),
  497.  
  498.     'T_plugins' => array(
  499.         'Creating plugins table',
  500.         "CREATE TABLE T_plugins (
  501.             plug_ID              INT(11) UNSIGNED NOT NULL auto_increment,
  502.             plug_priority        TINYINT NOT NULL default 50,
  503.             plug_classname       VARCHAR(40) NOT NULL default '',
  504.             plug_code            VARCHAR(32) NULL,
  505.             plug_apply_rendering ENUM( 'stealth', 'always', 'opt-out', 'opt-in', 'lazy', 'never' ) NOT NULL DEFAULT 'never',
  506.             plug_version         VARCHAR(42) NOT NULL default '0',
  507.             plug_name            VARCHAR(255) NULL default NULL,
  508.             plug_shortdesc       VARCHAR(255) NULL default NULL,
  509.             plug_status          ENUM( 'enabled', 'disabled', 'needs_config', 'broken' ) NOT NULL,
  510.             plug_spam_weight     TINYINT UNSIGNED NOT NULL DEFAULT 1,
  511.             PRIMARY KEY ( plug_ID ),
  512.             UNIQUE plug_code( plug_code ),
  513.             INDEX plug_status( plug_status )
  514.         )" ),
  515.  
  516.     'T_pluginsettings' => array(
  517.         'Creating plugin settings table',
  518.         'CREATE TABLE T_pluginsettings (
  519.             pset_plug_ID INT(11) UNSIGNED NOT NULL,
  520.             pset_name VARCHAR( 30 ) NOT NULL,
  521.             pset_value TEXT NULL,
  522.             PRIMARY KEY ( pset_plug_ID, pset_name )
  523.         )' ),
  524.  
  525.     'T_pluginusersettings' => array(
  526.         'Creating plugin user settings table',
  527.         'CREATE TABLE T_pluginusersettings (
  528.             puset_plug_ID INT(11) UNSIGNED NOT NULL,
  529.             puset_user_ID INT(11) UNSIGNED NOT NULL,
  530.             puset_name VARCHAR( 30 ) NOT NULL,
  531.             puset_value TEXT NULL,
  532.             PRIMARY KEY ( puset_plug_ID, puset_user_ID, puset_name )
  533.         )' ),
  534.  
  535.     'T_pluginevents' => array(
  536.         'Creating plugin events table',
  537.         'CREATE TABLE T_pluginevents(
  538.             pevt_plug_ID INT(11) UNSIGNED NOT NULL,
  539.             pevt_event VARCHAR(40) NOT NULL,
  540.             pevt_enabled TINYINT NOT NULL DEFAULT 1,
  541.             PRIMARY KEY( pevt_plug_ID, pevt_event )
  542.         )' ),
  543.  
  544.     'T_cron__task' => array(
  545.         'Creating cron tasks table',
  546.         'CREATE TABLE T_cron__task(
  547.             ctsk_ID              int(10) unsigned      not null AUTO_INCREMENT,
  548.             ctsk_start_datetime  datetime              not null,
  549.             ctsk_repeat_after    int(10) unsigned,
  550.             ctsk_name            varchar(50)           not null,
  551.             ctsk_controller      varchar(50)           not null,
  552.             ctsk_params          text,
  553.             PRIMARY KEY (ctsk_ID)
  554.         )' ),
  555.  
  556.     'T_cron__log' => array(
  557.         'Creating cron tasks table',
  558.         'CREATE TABLE T_cron__log(
  559.             clog_ctsk_ID              int(10) unsigned   not null,
  560.             clog_realstart_datetime   datetime           not null,
  561.             clog_realstop_datetime    datetime,
  562.             clog_status               enum(\'started\',\'finished\',\'error\',\'timeout\') not null default \'started\',
  563.             clog_messages             text,
  564.             PRIMARY KEY (clog_ctsk_ID)
  565.         )' ),
  566.  
  567. );
  568.  
  569.  
  570. /*
  571.  * $Log: _db_schema.inc.php,v $
  572.  * Revision 1.78.4.1  2008/02/09 03:03:26  fplanque
  573.  * cleanup
  574.  *
  575.  * Revision 1.78  2008/02/07 00:35:52  fplanque
  576.  * cleaned up install
  577.  *
  578.  * Revision 1.77  2008/01/20 18:20:23  fplanque
  579.  * Antispam per group setting
  580.  *
  581.  * Revision 1.76  2008/01/20 15:31:12  fplanque
  582.  * configurable validation/security rules
  583.  *
  584.  * Revision 1.75  2008/01/19 10:57:10  fplanque
  585.  * Splitting XHTML checking by group and interface
  586.  *
  587.  * Revision 1.74  2008/01/10 19:57:37  fplanque
  588.  * moved to v-3-0
  589.  *
  590.  * Revision 1.73  2008/01/09 00:25:51  blueyed
  591.  * Vastly improve performance in CommentList for large number of comments:
  592.  * - add index comment_date_ID; and force it in the SQL (falling back to comment_date)
  593.  *
  594.  * Revision 1.72  2007/11/30 01:46:12  fplanque
  595.  * db upgrade
  596.  *
  597.  * Revision 1.71  2007/11/28 17:29:44  fplanque
  598.  * Support for getting updates from b2evolution.net
  599.  *
  600.  * Revision 1.70  2007/11/03 22:38:34  fplanque
  601.  * no message
  602.  *
  603.  * Revision 1.69  2007/11/03 21:04:27  fplanque
  604.  * skin cleanup
  605.  *
  606.  * Revision 1.68  2007/11/02 01:52:51  fplanque
  607.  * comment ratings
  608.  *
  609.  * Revision 1.67  2007/09/19 02:54:16  fplanque
  610.  * bullet proof upgrade
  611.  *
  612.  * Revision 1.66  2007/06/26 02:43:16  fplanque
  613.  * cleanup
  614.  *
  615.  * Revision 1.65  2007/06/25 11:02:29  fplanque
  616.  * MODULES (refactored MVC)
  617.  *
  618.  * Revision 1.64  2007/06/03 02:54:18  fplanque
  619.  * Stuff for permission maniacs (admin part only, actual perms checks to be implemented)
  620.  * Newbies will not see this complexity since advanced perms are now disabled by default.
  621.  *
  622.  * Revision 1.63  2007/05/31 03:02:23  fplanque
  623.  * Advanced perms now disabled by default (simpler interface).
  624.  * Except when upgrading.
  625.  * Enable advanced perms in blog settings -> features
  626.  *
  627.  * Revision 1.62  2007/05/29 01:17:20  fplanque
  628.  * advanced admin blog settings are now restricted by a special permission
  629.  *
  630.  * Revision 1.61  2007/05/14 02:47:23  fplanque
  631.  * (not so) basic Tags framework
  632.  *
  633.  * Revision 1.60  2007/05/13 22:03:21  fplanque
  634.  * basic excerpt support
  635.  *
  636.  * Revision 1.59  2007/05/08 00:54:31  fplanque
  637.  * public blog list as a widget
  638.  *
  639.  * Revision 1.58  2007/05/04 21:23:17  fplanque
  640.  * no message
  641.  *
  642.  * Revision 1.57  2007/04/27 09:11:37  fplanque
  643.  * saving "spam" referers again (instead of buggy empty referers)
  644.  *
  645.  * Revision 1.56  2007/04/26 00:11:09  fplanque
  646.  * (c) 2007
  647.  *
  648.  * Revision 1.55  2007/03/25 15:18:57  fplanque
  649.  * cleanup
  650.  *
  651.  * Revision 1.54  2007/03/20 09:53:26  fplanque
  652.  * Letting boggers view their own stats.
  653.  * + Letthing admins view the aggregate by default.
  654.  *
  655.  * Revision 1.53  2007/03/11 22:48:19  fplanque
  656.  * handling of permission to redirect posts
  657.  *
  658.  * Revision 1.52  2007/02/13 00:38:11  blueyed
  659.  * Changed DB fields for 1.10.0: sess_data to MEDIUMTEXT (serialize() does not completely convert the binary data to text); post_content and itpr_content_prerendered to MEDIUMTEXT
  660.  *
  661.  * Revision 1.51  2007/02/03 19:05:36  fplanque
  662.  * allow longer posts
  663.  *
  664.  * Revision 1.50  2007/01/23 04:19:50  fplanque
  665.  * handling of blog owners
  666.  *
  667.  * Revision 1.49  2007/01/15 20:54:57  fplanque
  668.  * minor fix
  669.  *
  670.  * Revision 1.48  2007/01/08 23:45:48  fplanque
  671.  * A little less rough widget manager...
  672.  * (can handle multiple instances of same widget and remembers order)
  673.  *
  674.  * Revision 1.47  2007/01/08 21:53:51  fplanque
  675.  * typo
  676.  *
  677.  * Revision 1.46  2007/01/08 02:11:56  fplanque
  678.  * Blogs now make use of installed skins
  679.  * next step: make use of widgets inside of skins
  680.  *
  681.  * Revision 1.45  2007/01/07 23:38:20  fplanque
  682.  * discovery of skin containers
  683.  *
  684.  * Revision 1.44  2006/12/29 01:10:06  fplanque
  685.  * basic skin registering
  686.  *
  687.  * Revision 1.43  2006/12/07 20:03:33  fplanque
  688.  * Woohoo! File editing... means all skin editing.
  689.  *
  690.  * Revision 1.42  2006/12/07 16:06:24  fplanque
  691.  * prepared new file editing permission
  692.  *
  693.  * Revision 1.41  2006/12/04 21:25:18  fplanque
  694.  * removed user skin switching
  695.  *
  696.  * Revision 1.40  2006/11/30 22:34:16  fplanque
  697.  * bleh
  698.  *
  699.  * Revision 1.39  2006/11/05 20:13:57  fplanque
  700.  * minor
  701.  *
  702.  * Revision 1.38  2006/10/05 02:42:22  blueyed
  703.  * Remove index hit_datetime, because its slow on INSERT (e.g. 1s)
  704.  *
  705.  * Revision 1.37  2006/10/01 22:11:42  blueyed
  706.  * Ping services as plugins.
  707.  */
  708. ?>

Documentation generated on Sat, 06 Mar 2010 03:31:16 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).