b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.9) [ 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.26.2.10 2006/11/30 22:00:32 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.     'T_groups' => array(
  23.         'Creating table for Groups',
  24.         "CREATE TABLE T_groups (
  25.             grp_ID int(11) NOT NULL auto_increment,
  26.             grp_name varchar(50) NOT NULL default '',
  27.             grp_perm_admin enum('none','hidden','visible') NOT NULL default 'visible',
  28.             grp_perm_blogs enum('user','viewall','editall') NOT NULL default 'user',
  29.             grp_perm_stats enum('none','view','edit') NOT NULL default 'none',
  30.             grp_perm_spamblacklist enum('none','view','edit') NOT NULL default 'none',
  31.             grp_perm_options enum('none','view','edit') NOT NULL default 'none',
  32.             grp_perm_users enum('none','view','edit') NOT NULL default 'none',
  33.             grp_perm_templates TINYINT NOT NULL DEFAULT 0,
  34.             grp_perm_files enum('none','view','add','edit') NOT NULL default 'none',
  35.             PRIMARY KEY grp_ID (grp_ID)
  36.         )" ),
  37.  
  38.     'T_coll_user_perms' => array(
  39.         'Creating table for Blog-User permissions',
  40.         "CREATE TABLE T_coll_user_perms (
  41.             bloguser_blog_ID int(11) unsigned NOT NULL default 0,
  42.             bloguser_user_ID int(11) unsigned NOT NULL default 0,
  43.             bloguser_ismember tinyint NOT NULL default 0,
  44.             bloguser_perm_poststatuses set('published','deprecated','protected','private','draft') NOT NULL default '',
  45.             bloguser_perm_delpost tinyint NOT NULL default 0,
  46.             bloguser_perm_comments tinyint NOT NULL default 0,
  47.             bloguser_perm_cats tinyint NOT NULL default 0,
  48.             bloguser_perm_properties tinyint NOT NULL default 0,
  49.             bloguser_perm_media_upload tinyint NOT NULL default 0,
  50.             bloguser_perm_media_browse tinyint NOT NULL default 0,
  51.             bloguser_perm_media_change tinyint NOT NULL default 0,
  52.             PRIMARY KEY bloguser_pk (bloguser_blog_ID,bloguser_user_ID)
  53.         )" ),
  54.  
  55.     'T_settings' => array(
  56.         'Creating table for Settings',
  57.         "CREATE TABLE T_settings (
  58.             set_name VARCHAR( 30 ) NOT NULL ,
  59.             set_value VARCHAR( 255 ) NULL ,
  60.             PRIMARY KEY ( set_name )
  61.         )" ),
  62.  
  63.     'T_users' => array(
  64.         'Creating table for Users',
  65.         "CREATE TABLE T_users (
  66.             user_ID int(11) unsigned NOT NULL auto_increment,
  67.             user_login varchar(20) NOT NULL,
  68.             user_pass CHAR(32) NOT NULL,
  69.             user_firstname varchar(50) NULL,
  70.             user_lastname varchar(50) NULL,
  71.             user_nickname varchar(50) NULL,
  72.             user_icq int(11) unsigned NULL,
  73.             user_email varchar(255) NOT NULL,
  74.             user_url varchar(255) NULL,
  75.             user_ip varchar(15) NULL,
  76.             user_domain varchar(200) NULL,
  77.             user_browser varchar(200) NULL,
  78.             dateYMDhour datetime NOT NULL,
  79.             user_level int unsigned DEFAULT 0 NOT NULL,
  80.             user_aim varchar(50) NULL,
  81.             user_msn varchar(100) NULL,
  82.             user_yim varchar(50) NULL,
  83.             user_locale varchar(20) DEFAULT 'en-EU' NOT NULL,
  84.             user_idmode varchar(20) NOT NULL DEFAULT 'login',
  85.             user_allow_msgform TINYINT NOT NULL DEFAULT '1',
  86.             user_notify tinyint(1) NOT NULL default 1,
  87.             user_showonline tinyint(1) NOT NULL default 1,
  88.             user_grp_ID int(4) NOT NULL default 1,
  89.             user_validated TINYINT(1) NOT NULL DEFAULT 0,
  90.             PRIMARY KEY user_ID (user_ID),
  91.             UNIQUE user_login (user_login),
  92.             KEY user_grp_ID (user_grp_ID)
  93.         )" ),
  94.  
  95.     'T_blogs' => array(
  96.         'Creating table for Blogs',
  97.         "CREATE TABLE T_blogs (
  98.             blog_ID int(11) unsigned NOT NULL auto_increment,
  99.             blog_shortname varchar(12) NULL default '',
  100.             blog_name varchar(50) NOT NULL default '',
  101.             blog_tagline varchar(250) NULL default '',
  102.             blog_description varchar(250) NULL default '',
  103.             blog_longdesc TEXT NULL DEFAULT NULL,
  104.             blog_locale VARCHAR(20) NOT NULL DEFAULT 'en-EU',
  105.             blog_access_type VARCHAR(10) NOT NULL DEFAULT 'index.php',
  106.             blog_siteurl varchar(120) NOT NULL default '',
  107.             blog_staticfilename varchar(30) NULL default NULL,
  108.             blog_stub VARCHAR(255) NOT NULL DEFAULT 'stub',
  109.             blog_urlname VARCHAR(255) NOT NULL DEFAULT 'urlname',
  110.             blog_notes TEXT NULL,
  111.             blog_keywords tinytext,
  112.             blog_allowcomments VARCHAR(20) NOT NULL default 'post_by_post',
  113.             blog_allowtrackbacks TINYINT(1) NOT NULL default 1,
  114.             blog_allowblogcss TINYINT(1) NOT NULL default 1,
  115.             blog_allowusercss TINYINT(1) NOT NULL default 1,
  116.             blog_default_skin VARCHAR(30) NOT NULL DEFAULT 'custom',
  117.             blog_force_skin TINYINT(1) NOT NULL default 0,
  118.             blog_disp_bloglist TINYINT(1) NOT NULL DEFAULT 1,
  119.             blog_in_bloglist TINYINT(1) NOT NULL DEFAULT 1,
  120.             blog_links_blog_ID INT(11) NULL DEFAULT NULL,
  121.             blog_commentsexpire INT(4) NOT NULL DEFAULT 0,
  122.             blog_media_location ENUM( 'default', 'subdir', 'custom', 'none' ) DEFAULT 'default' NOT NULL,
  123.             blog_media_subdir VARCHAR( 255 ) NULL,
  124.             blog_media_fullpath VARCHAR( 255 ) NULL,
  125.             blog_media_url VARCHAR( 255 ) NULL,
  126.             blog_UID VARCHAR(20),
  127.             PRIMARY KEY blog_ID (blog_ID),
  128.             UNIQUE KEY blog_urlname (blog_urlname)
  129.         )" ),
  130.  
  131.     'T_coll_settings' => array(
  132.         'Creating collection settings table',
  133.         "CREATE TABLE T_coll_settings (
  134.             cset_coll_ID INT(11) UNSIGNED NOT NULL,
  135.             cset_name    VARCHAR( 30 ) NOT NULL,
  136.             cset_value   VARCHAR( 255 ) NULL,
  137.             PRIMARY KEY ( cset_coll_ID, cset_name )
  138.         )" ),
  139.  
  140.     'T_categories' => array(
  141.         'Creating table for Categories',
  142.         "CREATE TABLE T_categories (
  143.             cat_ID int(11) unsigned NOT NULL auto_increment,
  144.             cat_parent_ID int(11) unsigned NULL,
  145.             cat_name tinytext NOT NULL,
  146.             cat_blog_ID int(11) unsigned NOT NULL default 2,
  147.             cat_description VARCHAR(250) NULL DEFAULT NULL,
  148.             cat_longdesc TEXT NULL DEFAULT NULL,
  149.             cat_icon VARCHAR(30) NULL DEFAULT NULL,
  150.             PRIMARY KEY cat_ID (cat_ID),
  151.             KEY cat_blog_ID (cat_blog_ID),
  152.             KEY cat_parent_ID (cat_parent_ID)
  153.         )" ),
  154.  
  155.     'T_posts' => array(
  156.         'Creating table for Posts',
  157.         "CREATE TABLE T_posts (
  158.             post_ID                     int(11) unsigned NOT NULL auto_increment,
  159.             post_parent_ID              int(11) unsigned NULL,
  160.             post_creator_user_ID        int(11) unsigned NOT NULL,
  161.             post_lastedit_user_ID       int(11) unsigned NULL,
  162.             post_assigned_user_ID       int(11) unsigned NULL,
  163.             post_datestart              datetime NOT NULL,
  164.             post_datedeadline           datetime NULL,
  165.             post_datecreated            datetime NULL,
  166.             post_datemodified           datetime NOT NULL,
  167.             post_status                 enum('published','deprecated','protected','private','draft') NOT NULL default 'published',
  168.             post_pst_ID                 int(11) unsigned NULL,
  169.             post_ptyp_ID                int(11) unsigned NULL,
  170.             post_locale                 VARCHAR(20) NOT NULL DEFAULT 'en-EU',
  171.             post_content                text NULL,
  172.             post_title                  text NOT NULL,
  173.             post_urltitle               VARCHAR(50) NULL DEFAULT NULL,
  174.             post_url                    VARCHAR(255) NULL DEFAULT NULL,
  175.             post_main_cat_ID            int(11) unsigned NOT NULL,
  176.             post_notifications_status   ENUM('noreq','todo','started','finished') NOT NULL DEFAULT 'noreq',
  177.             post_notifications_ctsk_ID  INT(10) unsigned NULL DEFAULT NULL,
  178.             post_views                  INT(11) UNSIGNED NOT NULL DEFAULT 0,
  179.             post_wordcount              int(11) default NULL,
  180.             post_comment_status         ENUM('disabled', 'open', 'closed') NOT NULL DEFAULT 'open',
  181.             post_commentsexpire         DATETIME DEFAULT NULL,
  182.             post_renderers              TEXT NOT NULL,
  183.             post_priority               int(11) unsigned null,
  184.             PRIMARY KEY post_ID( post_ID ),
  185.             UNIQUE post_urltitle( post_urltitle ),
  186.             INDEX post_datestart( post_datestart ),
  187.             INDEX post_main_cat_ID( post_main_cat_ID ),
  188.             INDEX post_creator_user_ID( post_creator_user_ID ),
  189.             INDEX post_status( post_status ),
  190.             INDEX post_parent_ID( post_parent_ID ),
  191.             INDEX post_assigned_user_ID( post_assigned_user_ID ),
  192.             INDEX post_ptyp_ID( post_ptyp_ID ),
  193.             INDEX post_pst_ID( post_pst_ID )
  194.         )" ),
  195.  
  196.     'T_postcats' => array(
  197.         'Creating table for Categories-to-Posts relationships',
  198.         "CREATE TABLE T_postcats (
  199.             postcat_post_ID int(11) unsigned NOT NULL,
  200.             postcat_cat_ID int(11) unsigned NOT NULL,
  201.             PRIMARY KEY postcat_pk (postcat_post_ID,postcat_cat_ID),
  202.             UNIQUE catpost ( postcat_cat_ID, postcat_post_ID )
  203.         )" ),
  204.  
  205.     'T_comments' => array(    // Note: pingbacks no longer supported, but previous pingbacks are to be preserved in the DB
  206.         'Creating table for Comments',
  207.         "CREATE TABLE T_comments (
  208.             comment_ID        int(11) unsigned NOT NULL auto_increment,
  209.             comment_post_ID   int(11) unsigned NOT NULL default '0',
  210.             comment_type enum('comment','linkback','trackback','pingback') NOT NULL default 'comment',
  211.             comment_status ENUM('published', 'deprecated', 'protected', 'private', 'draft') DEFAULT 'published' NOT NULL,
  212.             comment_author_ID int unsigned NULL default NULL,
  213.             comment_author varchar(100) NULL,
  214.             comment_author_email varchar(255) NULL,
  215.             comment_author_url varchar(255) NULL,
  216.             comment_author_IP varchar(23) NOT NULL default '',
  217.             comment_date datetime NOT NULL,
  218.             comment_content text NOT NULL,
  219.             comment_karma int(11) NOT NULL default '0',
  220.             comment_spam_karma TINYINT NULL,
  221.             comment_allow_msgform TINYINT NOT NULL DEFAULT '0',
  222.             PRIMARY KEY comment_ID (comment_ID),
  223.             KEY comment_post_ID (comment_post_ID),
  224.             KEY comment_date (comment_date),
  225.             KEY comment_type (comment_type)
  226.         )" ),
  227.  
  228.     'T_locales' => array(
  229.         'Creating table for Locales',
  230.         "CREATE TABLE T_locales (
  231.             loc_locale varchar(20) NOT NULL default '',
  232.             loc_charset varchar(15) NOT NULL default 'iso-8859-1',
  233.             loc_datefmt varchar(20) NOT NULL default 'y-m-d',
  234.             loc_timefmt varchar(20) NOT NULL default 'H:i:s',
  235.             loc_startofweek TINYINT UNSIGNED NOT NULL DEFAULT 1,
  236.             loc_name varchar(40) NOT NULL default '',
  237.             loc_messages varchar(20) NOT NULL default '',
  238.             loc_priority tinyint(4) UNSIGNED NOT NULL default '0',
  239.             loc_enabled tinyint(4) NOT NULL default '1',
  240.             PRIMARY KEY loc_locale( loc_locale )
  241.         ) COMMENT='saves available locales'
  242.         " ),
  243.  
  244.     'T_antispam' => array(
  245.         'Creating table for Antispam Blacklist',
  246.         "CREATE TABLE T_antispam (
  247.             aspm_ID bigint(11) NOT NULL auto_increment,
  248.             aspm_string varchar(80) NOT NULL,
  249.             aspm_source enum( 'local','reported','central' ) NOT NULL default 'reported',
  250.             PRIMARY KEY aspm_ID (aspm_ID),
  251.             UNIQUE aspm_string (aspm_string)
  252.         )" ),
  253.  
  254.     'T_sessions' => array(
  255.         'Creating table for active sessions',
  256.         "CREATE TABLE T_sessions (
  257.             sess_ID        INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  258.             sess_key       CHAR(32) NULL,
  259.             sess_lastseen  DATETIME NOT NULL,
  260.             sess_ipaddress VARCHAR(15) NOT NULL DEFAULT '',
  261.             sess_user_ID   INT(10) DEFAULT NULL,
  262.             sess_data      TEXT DEFAULT NULL,
  263.             PRIMARY KEY( sess_ID )
  264.         )" )// NOTE: sess_lastseen is only relevant/used by Sessions class (+ stats) and results in a quite large index (file size wise)
  265.  
  266.     'T_usersettings' => array(
  267.         'Creating user settings table',
  268.         "CREATE TABLE T_usersettings (
  269.             uset_user_ID INT(11) UNSIGNED NOT NULL,
  270.             uset_name    VARCHAR( 30 ) NOT NULL,
  271.             uset_value   VARCHAR( 255 ) NULL,
  272.             PRIMARY KEY ( uset_user_ID, uset_name )
  273.         )" ),
  274.  
  275.     'T_item__prerendering' => array(
  276.         'Creating item prerendering cache table',
  277.         'CREATE TABLE T_item__prerendering(
  278.             itpr_itm_ID                   INT(11) UNSIGNED NOT NULL,
  279.             itpr_format                   ENUM(\'htmlbody\', \'entityencoded\', \'xml\', \'text\') NOT NULL,
  280.             itpr_renderers                TEXT NOT NULL,
  281.             itpr_content_prerendered      TEXT NULL,
  282.             itpr_datemodified             TIMESTAMP NOT NULL,
  283.             PRIMARY KEY (itpr_itm_ID, itpr_format)
  284.         )' ),
  285.  
  286.     'T_itemstatuses' => array(
  287.         'Creating table for Post Statuses',
  288.         "CREATE TABLE T_itemstatuses (
  289.             pst_ID   int(11) unsigned not null AUTO_INCREMENT,
  290.             pst_name varchar(30)      not null,
  291.             primary key ( pst_ID )
  292.         )" ),
  293.  
  294.     'T_itemtypes' => array(
  295.         'Creating table for Post Types',
  296.         "CREATE TABLE T_itemtypes (
  297.             ptyp_ID   int(11) unsigned not null AUTO_INCREMENT,
  298.             ptyp_name varchar(30)      not null,
  299.             primary key (ptyp_ID)
  300.         )" ),
  301.  
  302.     'T_files' => array(
  303.         'Creating table for File Meta Data',
  304.         "CREATE TABLE T_files (
  305.             file_ID        int(11) unsigned  not null AUTO_INCREMENT,
  306.             file_root_type enum('absolute','user','group','collection') not null default 'absolute',
  307.             file_root_ID   int(11) unsigned  not null default 0,
  308.             file_path      varchar(255)      not null default '',
  309.             file_title     varchar(255),
  310.             file_alt       varchar(255),
  311.             file_desc      text,
  312.             primary key (file_ID),
  313.             unique file (file_root_type, file_root_ID, file_path)
  314.         )" ),
  315.  
  316.     'T_basedomains' => array(
  317.         'Creating table for base domains',
  318.         "CREATE TABLE T_basedomains (
  319.             dom_ID     INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  320.             dom_name   VARCHAR(250) NOT NULL DEFAULT '',
  321.             dom_status ENUM('unknown','whitelist','blacklist') NOT NULL DEFAULT 'unknown',
  322.             dom_type   ENUM('unknown','normal','searcheng','aggregator') NOT NULL DEFAULT 'unknown',
  323.             PRIMARY KEY     (dom_ID),
  324.             UNIQUE dom_name (dom_name),
  325.             INDEX dom_type  (dom_type)
  326.         )" ),
  327.  
  328.     'T_useragents' => array(
  329.         'Creating table for user agents',
  330.         "CREATE TABLE T_useragents (
  331.             agnt_ID        INT UNSIGNED NOT NULL AUTO_INCREMENT,
  332.             agnt_signature VARCHAR(250) NOT NULL,
  333.             agnt_type      ENUM('rss','robot','browser','unknown') DEFAULT 'unknown' NOT NULL ,
  334.             PRIMARY KEY (agnt_ID),
  335.             INDEX agnt_type ( agnt_type )
  336.         )" ),
  337.  
  338.     'T_hitlog' => array(
  339.         'Creating table for Hit-Logs',
  340.         "CREATE TABLE T_hitlog (
  341.             hit_ID             INT(11) NOT NULL AUTO_INCREMENT,
  342.             hit_sess_ID        INT UNSIGNED,
  343.             hit_datetime       DATETIME NOT NULL,
  344.             hit_uri            VARCHAR(250) DEFAULT NULL,
  345.             hit_referer_type   ENUM('search','blacklist','referer','direct','self','admin') NOT NULL,
  346.             hit_referer        VARCHAR(250) DEFAULT NULL,
  347.             hit_referer_dom_ID INT UNSIGNED DEFAULT NULL,
  348.             hit_blog_ID        int(11) UNSIGNED NULL DEFAULT NULL,
  349.             hit_remote_addr    VARCHAR(40) DEFAULT NULL,
  350.             hit_agnt_ID        INT UNSIGNED NULL,
  351.             PRIMARY KEY         (hit_ID),
  352.             INDEX hit_agnt_ID        ( hit_agnt_ID ),
  353.             INDEX hit_blog_ID        ( hit_blog_ID ),
  354.             INDEX hit_uri            ( hit_uri ),
  355.             INDEX hit_referer_dom_ID ( hit_referer_dom_ID )
  356.         )" ),
  357.  
  358.     'T_subscriptions' => array(
  359.         'Creating table for subscriptions',
  360.         "CREATE TABLE T_subscriptions (
  361.             sub_coll_ID     int(11) unsigned    not null,
  362.             sub_user_ID     int(11) unsigned    not null,
  363.             sub_items       tinyint(1)          not null,
  364.             sub_comments    tinyint(1)          not null,
  365.             primary key (sub_coll_ID, sub_user_ID)
  366.         )" ),
  367.  
  368.     'T_coll_group_perms' => array(
  369.         'Creating table for blog-group permissions',
  370.         "CREATE TABLE T_coll_group_perms (
  371.             bloggroup_blog_ID int(11) unsigned NOT NULL default 0,
  372.             bloggroup_group_ID int(11) unsigned NOT NULL default 0,
  373.             bloggroup_ismember tinyint NOT NULL default 0,
  374.             bloggroup_perm_poststatuses set('published','deprecated','protected','private','draft') NOT NULL default '',
  375.             bloggroup_perm_delpost tinyint NOT NULL default 0,
  376.             bloggroup_perm_comments tinyint NOT NULL default 0,
  377.             bloggroup_perm_cats tinyint NOT NULL default 0,
  378.             bloggroup_perm_properties tinyint NOT NULL default 0,
  379.             bloggroup_perm_media_upload tinyint NOT NULL default 0,
  380.             bloggroup_perm_media_browse tinyint NOT NULL default 0,
  381.             bloggroup_perm_media_change tinyint NOT NULL default 0,
  382.             PRIMARY KEY bloggroup_pk (bloggroup_blog_ID,bloggroup_group_ID)
  383.         )" ),
  384.  
  385.     'T_links' => array(
  386.         'Creating table for Post Links',
  387.         "CREATE TABLE T_links (
  388.             link_ID               int(11) unsigned  not null AUTO_INCREMENT,
  389.             link_datecreated      datetime          not null,
  390.             link_datemodified     datetime          not null,
  391.             link_creator_user_ID  int(11) unsigned  not null,
  392.             link_lastedit_user_ID int(11) unsigned  not null,
  393.             link_itm_ID           int(11) unsigned  NOT NULL,
  394.             link_dest_itm_ID      int(11) unsigned  NULL,
  395.             link_file_ID          int(11) unsigned  NULL,
  396.             link_ltype_ID         int(11) unsigned  NOT NULL default 1,
  397.             link_external_url     VARCHAR(255)      NULL,
  398.             link_title            TEXT              NULL,
  399.             PRIMARY KEY (link_ID),
  400.             INDEX link_itm_ID( link_itm_ID ),
  401.             INDEX link_dest_itm_ID (link_dest_itm_ID),
  402.             INDEX link_file_ID (link_file_ID)
  403.         )" ),
  404.  
  405.     'T_filetypes' => array(
  406.         'Creating table for file types',
  407.         'CREATE TABLE T_filetypes (
  408.             ftyp_ID int(11) unsigned NOT NULL auto_increment,
  409.             ftyp_extensions varchar(30) NOT NULL,
  410.             ftyp_name varchar(30) NOT NULL,
  411.             ftyp_mimetype varchar(50) NOT NULL,
  412.             ftyp_icon varchar(20) default NULL,
  413.             ftyp_viewtype varchar(10) NOT NULL,
  414.             ftyp_allowed tinyint(1) NOT NULL default 0,
  415.             PRIMARY KEY (ftyp_ID)
  416.         )' ),
  417.  
  418.     'T_plugins' => array(
  419.         'Creating plugins table',
  420.         "CREATE TABLE T_plugins (
  421.             plug_ID              INT(11) UNSIGNED NOT NULL auto_increment,
  422.             plug_priority        TINYINT NOT NULL default 50,
  423.             plug_classname       VARCHAR(40) NOT NULL default '',
  424.             plug_code            VARCHAR(32) NULL,
  425.             plug_apply_rendering ENUM( 'stealth', 'always', 'opt-out', 'opt-in', 'lazy', 'never' ) NOT NULL DEFAULT 'never',
  426.             plug_version         VARCHAR(42) NOT NULL default '0',
  427.             plug_name            VARCHAR(255) NULL default NULL,
  428.             plug_shortdesc       VARCHAR(255) NULL default NULL,
  429.             plug_status          ENUM( 'enabled', 'disabled', 'needs_config', 'broken' ) NOT NULL,
  430.             plug_spam_weight     TINYINT UNSIGNED NOT NULL DEFAULT 1,
  431.             PRIMARY KEY ( plug_ID ),
  432.             UNIQUE plug_code( plug_code ),
  433.             INDEX plug_status( plug_status )
  434.         )" ),
  435.  
  436.     'T_pluginsettings' => array(
  437.         'Creating plugin settings table',
  438.         'CREATE TABLE T_pluginsettings (
  439.             pset_plug_ID INT(11) UNSIGNED NOT NULL,
  440.             pset_name VARCHAR( 30 ) NOT NULL,
  441.             pset_value TEXT NULL,
  442.             PRIMARY KEY ( pset_plug_ID, pset_name )
  443.         )' ),
  444.  
  445.     'T_pluginusersettings' => array(
  446.         'Creating plugin user settings table',
  447.         'CREATE TABLE T_pluginusersettings (
  448.             puset_plug_ID INT(11) UNSIGNED NOT NULL,
  449.             puset_user_ID INT(11) UNSIGNED NOT NULL,
  450.             puset_name VARCHAR( 30 ) NOT NULL,
  451.             puset_value TEXT NULL,
  452.             PRIMARY KEY ( puset_plug_ID, puset_user_ID, puset_name )
  453.         )' ),
  454.  
  455.     'T_pluginevents' => array(
  456.         'Creating plugin events table',
  457.         'CREATE TABLE T_pluginevents(
  458.             pevt_plug_ID INT(11) UNSIGNED NOT NULL,
  459.             pevt_event VARCHAR(40) NOT NULL,
  460.             pevt_enabled TINYINT NOT NULL DEFAULT 1,
  461.             PRIMARY KEY( pevt_plug_ID, pevt_event )
  462.         )' ),
  463.  
  464.     'T_cron__task' => array(
  465.         'Creating cron tasks table',
  466.         'CREATE TABLE T_cron__task(
  467.             ctsk_ID              int(10) unsigned      not null AUTO_INCREMENT,
  468.             ctsk_start_datetime  datetime              not null,
  469.             ctsk_repeat_after    int(10) unsigned,
  470.             ctsk_name            varchar(50)           not null,
  471.             ctsk_controller      varchar(50)           not null,
  472.             ctsk_params          text,
  473.             PRIMARY KEY (ctsk_ID)
  474.         )' ),
  475.  
  476.     'T_cron__log' => array(
  477.         'Creating cron tasks table',
  478.         'CREATE TABLE T_cron__log(
  479.             clog_ctsk_ID              int(10) unsigned   not null,
  480.             clog_realstart_datetime   datetime           not null,
  481.             clog_realstop_datetime    datetime,
  482.             clog_status               enum(\'started\',\'finished\',\'error\',\'timeout\') not null default \'started\',
  483.             clog_messages             text,
  484.             PRIMARY KEY (clog_ctsk_ID)
  485.         )' ),
  486.  
  487. );
  488.  
  489.  
  490. /*
  491.  * $Log: _db_schema.inc.php,v $
  492.  * Revision 1.26.2.10  2006/11/30 22:00:32  fplanque
  493.  * bleh!
  494.  *
  495.  * Revision 1.26.2.9  2006/11/05 20:37:32  fplanque
  496.  * no message
  497.  *
  498.  * Revision 1.26.2.8  2006/11/04 19:55:06  fplanque
  499.  * Reinjected old Log blocks. Removing them from CVS was a bad idea -- especially since Daniel has decided branch 1.9 was his HEAD...
  500.  *
  501.  * Revision 1.38  2006/10/05 02:42:22  blueyed
  502.  * Remove index hit_datetime, because its slow on INSERT (e.g. 1s)
  503.  *
  504.  * Revision 1.37  2006/10/01 22:11:42  blueyed
  505.  * Ping services as plugins.
  506.  *
  507.  * Revision 1.36  2006/09/30 23:42:06  blueyed
  508.  * Allow editing the plugin name and short desc of installed plugins
  509.  *
  510.  * Revision 1.35  2006/09/25 20:25:49  blueyed
  511.  * Extended date- and time-format fields for locales to 20 chars. See http://forums.b2evolution.net//viewtopic.php?p=44335#44335
  512.  *
  513.  * Revision 1.34  2006/09/23 19:32:06  blueyed
  514.  * Schema for pre-rendered changes
  515.  *
  516.  * Revision 1.33  2006/09/22 17:26:32  blueyed
  517.  * itpr_format should be NOT NULL (MySQL3 requires this also for a PK and it will never be NULL anyway)
  518.  *
  519.  * Revision 1.32  2006/09/21 16:54:26  blueyed
  520.  * Experimental caching of pre-rendered item content. Added table T_item__prerendering.
  521.  *
  522.  * Revision 1.26  2006/08/04 22:13:23  blueyed
  523.  * Finished de-abstraction
  524.  *
  525.  * Revision 1.25  2006/08/03 19:39:06  blueyed
  526.  * hit_uri index (needed when checking for page reload)
  527.  *
  528.  * Revision 1.24  2006/08/03 01:53:40  blueyed
  529.  * whitespace
  530.  *
  531.  * Revision 1.23  2006/07/23 17:19:52  blueyed
  532.  * MFB
  533.  *
  534.  * Revision 1.22  2006/07/06 19:59:08  fplanque
  535.  * better logs, better stats, better pruning
  536.  *
  537.  * Revision 1.21  2006/07/03 19:19:14  blueyed
  538.  * Added indices
  539.  *
  540.  * Revision 1.20  2006/06/13 21:49:16  blueyed
  541.  * Merged from 1.8 branch
  542.  *
  543.  * Revision 1.19.2.1  2006/06/13 18:27:51  fplanque
  544.  * fixes
  545.  *
  546.  * Revision 1.19  2006/05/02 23:46:07  blueyed
  547.  * Validate/fixed plugin spam weight handling.
  548.  *
  549.  * Revision 1.18  2006/05/02 04:36:25  blueyed
  550.  * Spam karma changed (-100..100 instead of abs/max); Spam weight for plugins; publish/delete threshold
  551.  *
  552.  * Revision 1.17  2006/04/22 02:58:05  blueyed
  553.  * Added Id keyword
  554.  *
  555.  * Revision 1.16  2006/04/22 02:36:39  blueyed
  556.  * Validate users on registration through email link (+cleanup around it)
  557.  *
  558.  * Revision 1.15  2006/04/20 17:59:02  blueyed
  559.  * Removed "spam" from hit_referer_type (DB) and summary stats
  560.  *
  561.  * Revision 1.14  2006/04/20 16:31:30  fplanque
  562.  * comment moderation (finished for 1.8)
  563.  *
  564.  * Revision 1.13  2006/04/19 15:56:02  blueyed
  565.  * Renamed T_posts.post_comments to T_posts.post_comment_status (DB column rename!);
  566.  * and Item::comments to Item::comment_status (Item API change)
  567.  *
  568.  * Revision 1.12  2006/04/11 22:39:50  blueyed
  569.  * Fixed installation of basic plugins, though again more complicated (IMHO)
  570.  *
  571.  * Revision 1.11  2006/04/11 21:22:26  fplanque
  572.  * partial cleanup
  573.  *
  574.  */
  575. ?>

Documentation generated on Tue, 18 Dec 2007 19:14:08 +0100 by phpDocumentor 1.4.0