[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/install/ -> _db_schema.inc.php (source)

   1  <?php
   2  /**

   3   * This file holds the b2evo database scheme.

   4   *

   5   * @version $Id: _db_schema.inc.php,v 1.70 2007/11/03 22:38:34 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_stats enum('none','user','view','edit') NOT NULL default 'none',
  31              grp_perm_spamblacklist enum('none','view','edit') NOT NULL default 'none',
  32              grp_perm_options enum('none','view','edit') NOT NULL default 'none',
  33              grp_perm_users enum('none','view','edit') NOT NULL default 'none',
  34              grp_perm_templates TINYINT NOT NULL DEFAULT 0,
  35              grp_perm_files enum('none','view','add','edit','all') NOT NULL default 'none',
  36              PRIMARY KEY grp_ID (grp_ID)
  37          )" ),
  38  
  39      'T_settings' => array(
  40          'Creating table for Settings',
  41          "CREATE TABLE T_settings (
  42              set_name VARCHAR( 30 ) NOT NULL ,
  43              set_value VARCHAR( 255 ) NULL ,
  44              PRIMARY KEY ( set_name )
  45          )" ),
  46  
  47      'T_users' => array(
  48          'Creating table for Users',
  49          "CREATE TABLE T_users (
  50              user_ID int(11) unsigned NOT NULL auto_increment,
  51              user_login varchar(20) NOT NULL,
  52              user_pass CHAR(32) NOT NULL,
  53              user_firstname varchar(50) NULL,
  54              user_lastname varchar(50) NULL,
  55              user_nickname varchar(50) NULL,
  56              user_icq int(11) unsigned NULL,
  57              user_email varchar(255) NOT NULL,
  58              user_url varchar(255) NULL,
  59              user_ip varchar(15) NULL,
  60              user_domain varchar(200) NULL,
  61              user_browser varchar(200) NULL,
  62              dateYMDhour datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  63              user_level int unsigned DEFAULT 0 NOT NULL,
  64              user_aim varchar(50) NULL,
  65              user_msn varchar(100) NULL,
  66              user_yim varchar(50) NULL,
  67              user_locale varchar(20) DEFAULT 'en-EU' NOT NULL,
  68              user_idmode varchar(20) NOT NULL DEFAULT 'login',
  69              user_allow_msgform TINYINT NOT NULL DEFAULT '1',
  70              user_notify tinyint(1) NOT NULL default 1,
  71              user_showonline tinyint(1) NOT NULL default 1,
  72              user_grp_ID int(4) NOT NULL default 1,
  73              user_validated TINYINT(1) NOT NULL DEFAULT 0,
  74              PRIMARY KEY user_ID (user_ID),
  75              UNIQUE user_login (user_login),
  76              KEY user_grp_ID (user_grp_ID)
  77          )" ),
  78  
  79      'T_skins__skin' => array(
  80          'Creating table for installed skins',
  81          "CREATE TABLE T_skins__skin (
  82                  skin_ID      int(10) unsigned      NOT NULL auto_increment,
  83                  skin_name    varchar(32)           NOT NULL,
  84                  skin_type    enum('normal','feed') NOT NULL default 'normal',
  85                  skin_folder  varchar(32)           NOT NULL,
  86                  PRIMARY KEY skin_ID (skin_ID),
  87                  UNIQUE skin_folder( skin_folder ),
  88                  KEY skin_name( skin_name )
  89              )" ),
  90  
  91      'T_skins__container' => array(
  92          'Creating table for skin containers',
  93          "CREATE TABLE T_skins__container (
  94                  sco_skin_ID   int(10) unsigned      NOT NULL,
  95                  sco_name      varchar(40)           NOT NULL,
  96                  PRIMARY KEY (sco_skin_ID, sco_name)
  97              )" ),
  98  
  99      'T_blogs' => array(
 100          'Creating table for Blogs',
 101          "CREATE TABLE T_blogs (
 102              blog_ID              int(11) unsigned NOT NULL auto_increment,
 103              blog_shortname       varchar(12) NULL default '',
 104              blog_name            varchar(50) NOT NULL default '',
 105              blog_owner_user_ID   int(11) unsigned NOT NULL default 1,
 106              blog_advanced_perms  TINYINT(1) NOT NULL default 0,
 107              blog_tagline         varchar(250) NULL default '',
 108              blog_description     varchar(250) NULL default '',
 109              blog_longdesc        TEXT NULL DEFAULT NULL,
 110              blog_locale          VARCHAR(20) NOT NULL DEFAULT 'en-EU',
 111              blog_access_type     VARCHAR(10) NOT NULL DEFAULT 'index.php',
 112              blog_siteurl         varchar(120) NOT NULL default '',
 113              blog_urlname         VARCHAR(255) NOT NULL DEFAULT 'urlname',
 114              blog_notes           TEXT NULL,
 115              blog_keywords        tinytext,
 116              blog_allowcomments   VARCHAR(20) NOT NULL default 'post_by_post',
 117              blog_allowtrackbacks TINYINT(1) NOT NULL default 0,
 118              blog_allowblogcss    TINYINT(1) NOT NULL default 1,
 119              blog_allowusercss    TINYINT(1) NOT NULL default 1,
 120              blog_skin_ID         INT(10) UNSIGNED NOT NULL DEFAULT 1,
 121              blog_in_bloglist     TINYINT(1) NOT NULL DEFAULT 1,
 122              blog_links_blog_ID   INT(11) NULL DEFAULT NULL,
 123              blog_commentsexpire  INT(4) NOT NULL DEFAULT 0,
 124              blog_media_location  ENUM( 'default', 'subdir', 'custom', 'none' ) DEFAULT 'default' NOT NULL,
 125              blog_media_subdir    VARCHAR( 255 ) NULL,
 126              blog_media_fullpath  VARCHAR( 255 ) NULL,
 127              blog_media_url       VARCHAR( 255 ) NULL,
 128              blog_UID             VARCHAR(20),
 129              PRIMARY KEY blog_ID (blog_ID),
 130              UNIQUE KEY blog_urlname (blog_urlname)
 131          )" ),
 132  
 133      'T_coll_settings' => array(
 134          'Creating collection settings table',
 135          "CREATE TABLE T_coll_settings (
 136              cset_coll_ID INT(11) UNSIGNED NOT NULL,
 137              cset_name    VARCHAR( 30 ) NOT NULL,
 138              cset_value   VARCHAR( 255 ) NULL,
 139              PRIMARY KEY ( cset_coll_ID, cset_name )
 140          )" ),
 141  
 142      'T_widget' => array(
 143          'Creating components table',
 144          "CREATE TABLE T_widget (
 145              wi_ID                    INT(10) UNSIGNED auto_increment,
 146              wi_coll_ID    INT(11) UNSIGNED NOT NULL,
 147              wi_sco_name   VARCHAR( 40 ) NOT NULL,
 148              wi_order            INT(10) UNSIGNED NOT NULL,
 149              wi_type       ENUM( 'core', 'plugin' ) NOT NULL DEFAULT 'core',
 150              wi_code       VARCHAR(32) NOT NULL,
 151              wi_params     TEXT NULL,
 152              PRIMARY KEY ( wi_ID ),
 153              UNIQUE wi_order( wi_coll_ID, wi_sco_name, wi_order )
 154          )" ),
 155  
 156      'T_categories' => array(
 157          'Creating table for Categories',
 158          "CREATE TABLE T_categories (
 159              cat_ID int(11) unsigned NOT NULL auto_increment,
 160              cat_parent_ID int(11) unsigned NULL,
 161              cat_name tinytext NOT NULL,
 162              cat_urlname varchar(255) NOT NULL,
 163              cat_blog_ID int(11) unsigned NOT NULL default 2,
 164              cat_description VARCHAR(250) NULL DEFAULT NULL,
 165              cat_longdesc TEXT NULL DEFAULT NULL,
 166              cat_icon VARCHAR(30) NULL DEFAULT NULL,
 167              PRIMARY KEY cat_ID (cat_ID),
 168              UNIQUE cat_urlname( cat_urlname ),
 169              KEY cat_blog_ID (cat_blog_ID),
 170              KEY cat_parent_ID (cat_parent_ID)
 171          )" ),
 172  
 173      'T_items__item' => array(
 174          'Creating table for Posts',
 175          "CREATE TABLE T_items__item (
 176              post_ID                     int(11) unsigned NOT NULL auto_increment,
 177              post_parent_ID              int(11) unsigned NULL,
 178              post_creator_user_ID        int(11) unsigned NOT NULL,
 179              post_lastedit_user_ID       int(11) unsigned NULL,
 180              post_assigned_user_ID       int(11) unsigned NULL,
 181              post_datestart              datetime NOT NULL,
 182              post_datedeadline           datetime NULL,
 183              post_datecreated            datetime NULL,
 184              post_datemodified           datetime NOT NULL,
 185              post_status                 enum('published','deprecated','protected','private','draft','redirected') NOT NULL default 'published',
 186              post_pst_ID                 int(11) unsigned NULL,
 187              post_ptyp_ID                int(11) unsigned NULL,
 188              post_locale                 VARCHAR(20) NOT NULL DEFAULT 'en-EU',
 189              post_content                MEDIUMTEXT NULL,
 190              post_excerpt                text NULL,
 191              post_title                  text NOT NULL,
 192              post_urltitle               VARCHAR(50) NULL DEFAULT NULL,
 193              post_url                    VARCHAR(255) NULL DEFAULT NULL,
 194              post_main_cat_ID            int(11) unsigned NOT NULL,
 195              post_notifications_status   ENUM('noreq','todo','started','finished') NOT NULL DEFAULT 'noreq',
 196              post_notifications_ctsk_ID  INT(10) unsigned NULL DEFAULT NULL,
 197              post_views                  INT(11) UNSIGNED NOT NULL DEFAULT 0,
 198              post_wordcount              int(11) default NULL,
 199              post_comment_status         ENUM('disabled', 'open', 'closed') NOT NULL DEFAULT 'open',
 200              post_commentsexpire         DATETIME DEFAULT NULL,
 201              post_renderers              TEXT NOT NULL,
 202              post_priority               int(11) unsigned null,
 203              PRIMARY KEY post_ID( post_ID ),
 204              UNIQUE post_urltitle( post_urltitle ),
 205              INDEX post_datestart( post_datestart ),
 206              INDEX post_main_cat_ID( post_main_cat_ID ),
 207              INDEX post_creator_user_ID( post_creator_user_ID ),
 208              INDEX post_status( post_status ),
 209              INDEX post_parent_ID( post_parent_ID ),
 210              INDEX post_assigned_user_ID( post_assigned_user_ID ),
 211              INDEX post_ptyp_ID( post_ptyp_ID ),
 212              INDEX post_pst_ID( post_pst_ID )
 213          )" ),
 214  
 215      'T_postcats' => array(
 216          'Creating table for Categories-to-Posts relationships',
 217          "CREATE TABLE T_postcats (
 218              postcat_post_ID int(11) unsigned NOT NULL,
 219              postcat_cat_ID int(11) unsigned NOT NULL,
 220              PRIMARY KEY postcat_pk (postcat_post_ID,postcat_cat_ID),
 221              UNIQUE catpost ( postcat_cat_ID, postcat_post_ID )
 222          )" ),
 223  
 224      'T_comments' => array(    // Note: pingbacks no longer supported, but previous pingbacks are to be preserved in the DB
 225          'Creating table for Comments',
 226          "CREATE TABLE T_comments (
 227              comment_ID        int(11) unsigned NOT NULL auto_increment,
 228              comment_post_ID   int(11) unsigned NOT NULL default '0',
 229              comment_type enum('comment','linkback','trackback','pingback') NOT NULL default 'comment',
 230              comment_status ENUM('published','deprecated','protected','private','draft','redirected') DEFAULT 'published' NOT NULL,
 231              comment_author_ID int unsigned NULL default NULL,
 232              comment_author varchar(100) NULL,
 233              comment_author_email varchar(255) NULL,
 234              comment_author_url varchar(255) NULL,
 235              comment_author_IP  varchar(23) NOT NULL default '',
 236              comment_date       datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
 237              comment_content    text NOT NULL,
 238              comment_rating     TINYINT(1) NULL DEFAULT NULL,
 239              comment_featured   TINYINT(1) NOT NULL DEFAULT 0,
 240              comment_nofollow   TINYINT(1) NOT NULL DEFAULT 1,
 241              comment_karma      INT(11) NOT NULL default '0',
 242              comment_spam_karma TINYINT NULL,
 243              comment_allow_msgform TINYINT NOT NULL DEFAULT '0',
 244              PRIMARY KEY comment_ID (comment_ID),
 245              KEY comment_post_ID (comment_post_ID),
 246              KEY comment_date (comment_date),
 247              KEY comment_type (comment_type)
 248          )" ),
 249  
 250      'T_locales' => array(
 251          'Creating table for Locales',
 252          "CREATE TABLE T_locales (
 253              loc_locale varchar(20) NOT NULL default '',
 254              loc_charset varchar(15) NOT NULL default 'iso-8859-1',
 255              loc_datefmt varchar(20) NOT NULL default 'y-m-d',
 256              loc_timefmt varchar(20) NOT NULL default 'H:i:s',
 257              loc_startofweek TINYINT UNSIGNED NOT NULL DEFAULT 1,
 258              loc_name varchar(40) NOT NULL default '',
 259              loc_messages varchar(20) NOT NULL default '',
 260              loc_priority tinyint(4) UNSIGNED NOT NULL default '0',
 261              loc_enabled tinyint(4) NOT NULL default '1',
 262              PRIMARY KEY loc_locale( loc_locale )
 263          ) COMMENT='saves available locales'
 264          " ),
 265  
 266      'T_antispam' => array(
 267          'Creating table for Antispam Blacklist',
 268          "CREATE TABLE T_antispam (
 269              aspm_ID bigint(11) NOT NULL auto_increment,
 270              aspm_string varchar(80) NOT NULL,
 271              aspm_source enum( 'local','reported','central' ) NOT NULL default 'reported',
 272              PRIMARY KEY aspm_ID (aspm_ID),
 273              UNIQUE aspm_string (aspm_string)
 274          )" ),
 275  
 276      'T_sessions' => array(
 277          'Creating table for active sessions',
 278          "CREATE TABLE T_sessions (
 279              sess_ID        INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
 280              sess_key       CHAR(32) NULL,
 281              sess_lastseen  DATETIME NOT NULL,
 282              sess_ipaddress VARCHAR(15) NOT NULL DEFAULT '',
 283              sess_user_ID   INT(10) DEFAULT NULL,
 284              sess_data      MEDIUMBLOB DEFAULT NULL,
 285              PRIMARY KEY( sess_ID )
 286          )" ), // NOTE: sess_lastseen is only relevant/used by Sessions class (+ stats) and results in a quite large index (file size wise)
 287          // NOTE: sess_data is (MEDIUM)BLOB because e.g. serialize() does not completely convert binary data to text

 288  
 289      'T_usersettings' => array(
 290          'Creating user settings table',
 291          "CREATE TABLE T_usersettings (
 292              uset_user_ID INT(11) UNSIGNED NOT NULL,
 293              uset_name    VARCHAR( 30 ) NOT NULL,
 294              uset_value   VARCHAR( 255 ) NULL,
 295              PRIMARY KEY ( uset_user_ID, uset_name )
 296          )" ),
 297  
 298      'T_items__prerendering' => array(
 299          'Creating item prerendering cache table',
 300          'CREATE TABLE T_items__prerendering(
 301              itpr_itm_ID                   INT(11) UNSIGNED NOT NULL,
 302              itpr_format                   ENUM(\'htmlbody\', \'entityencoded\', \'xml\', \'text\') NOT NULL,
 303              itpr_renderers                TEXT NOT NULL,
 304              itpr_content_prerendered      MEDIUMTEXT NULL,
 305              itpr_datemodified             TIMESTAMP NOT NULL,
 306              PRIMARY KEY (itpr_itm_ID, itpr_format)
 307          )' ),
 308  
 309      'T_items__status' => array(
 310          'Creating table for Post Statuses',
 311          "CREATE TABLE T_items__status (
 312              pst_ID   int(11) unsigned not null AUTO_INCREMENT,
 313              pst_name varchar(30)      not null,
 314              primary key ( pst_ID )
 315          )" ),
 316  
 317      'T_items__type' => array(
 318          'Creating table for Post Types',
 319          "CREATE TABLE T_items__type (
 320              ptyp_ID   int(11) unsigned not null AUTO_INCREMENT,
 321              ptyp_name varchar(30)      not null,
 322              primary key (ptyp_ID)
 323          )" ),
 324  
 325      'T_items__tag' => array(
 326          'Creating table for Tags',
 327          "CREATE TABLE T_items__tag (
 328              tag_ID   int(11) unsigned not null AUTO_INCREMENT,
 329              tag_name varchar(50)      not null,
 330              primary key (tag_ID),
 331              UNIQUE tag_name( tag_name )
 332          )" ),
 333  
 334      'T_items__itemtag' => array(
 335          'Creating table for Post-to-Tag relationships',
 336          "CREATE TABLE T_items__itemtag (
 337              itag_itm_ID int(11) unsigned NOT NULL,
 338              itag_tag_ID int(11) unsigned NOT NULL,
 339              PRIMARY KEY (itag_itm_ID, itag_tag_ID),
 340              UNIQUE tagitem ( itag_tag_ID, itag_itm_ID )
 341          )" ),
 342  
 343      'T_files' => array(
 344          'Creating table for File Meta Data',
 345          "CREATE TABLE T_files (
 346              file_ID        int(11) unsigned  not null AUTO_INCREMENT,
 347              file_root_type enum('absolute','user','group','collection','skins') not null default 'absolute',
 348              file_root_ID   int(11) unsigned  not null default 0,
 349              file_path      varchar(255)      not null default '',
 350              file_title     varchar(255),
 351              file_alt       varchar(255),
 352              file_desc      text,
 353              primary key (file_ID),
 354              unique file (file_root_type, file_root_ID, file_path)
 355          )" ),
 356  
 357      'T_basedomains' => array(
 358          'Creating table for base domains',
 359          "CREATE TABLE T_basedomains (
 360              dom_ID     INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
 361              dom_name   VARCHAR(250) NOT NULL DEFAULT '',
 362              dom_status ENUM('unknown','whitelist','blacklist') NOT NULL DEFAULT 'unknown',
 363              dom_type   ENUM('unknown','normal','searcheng','aggregator') NOT NULL DEFAULT 'unknown',
 364              PRIMARY KEY     (dom_ID),
 365              UNIQUE dom_name (dom_name),
 366              INDEX dom_type  (dom_type)
 367          )" ),
 368  
 369      'T_useragents' => array(
 370          'Creating table for user agents',
 371          "CREATE TABLE T_useragents (
 372              agnt_ID        INT UNSIGNED NOT NULL AUTO_INCREMENT,
 373              agnt_signature VARCHAR(250) NOT NULL,
 374              agnt_type      ENUM('rss','robot','browser','unknown') DEFAULT 'unknown' NOT NULL ,
 375              PRIMARY KEY (agnt_ID),
 376              INDEX agnt_type ( agnt_type )
 377          )" ),
 378  
 379      'T_hitlog' => array(
 380          'Creating table for Hit-Logs',
 381          "CREATE TABLE T_hitlog (
 382              hit_ID             INT(11) NOT NULL AUTO_INCREMENT,
 383              hit_sess_ID        INT UNSIGNED,
 384              hit_datetime       DATETIME NOT NULL,
 385              hit_uri            VARCHAR(250) DEFAULT NULL,
 386              hit_referer_type   ENUM('search','blacklist','spam','referer','direct','self','admin') NOT NULL,
 387              hit_referer        VARCHAR(250) DEFAULT NULL,
 388              hit_referer_dom_ID INT UNSIGNED DEFAULT NULL,
 389              hit_blog_ID        int(11) UNSIGNED NULL DEFAULT NULL,
 390              hit_remote_addr    VARCHAR(40) DEFAULT NULL,
 391              hit_agnt_ID        INT UNSIGNED NULL,
 392              PRIMARY KEY         (hit_ID),
 393              INDEX hit_agnt_ID        ( hit_agnt_ID ),
 394              INDEX hit_blog_ID        ( hit_blog_ID ),
 395              INDEX hit_uri            ( hit_uri ),
 396              INDEX hit_referer_dom_ID ( hit_referer_dom_ID )
 397          )" ),
 398  
 399      'T_subscriptions' => array(
 400          'Creating table for subscriptions',
 401          "CREATE TABLE T_subscriptions (
 402              sub_coll_ID     int(11) unsigned    not null,
 403              sub_user_ID     int(11) unsigned    not null,
 404              sub_items       tinyint(1)          not null,
 405              sub_comments    tinyint(1)          not null,
 406              primary key (sub_coll_ID, sub_user_ID)
 407          )" ),
 408  
 409      'T_coll_user_perms' => array(
 410          'Creating table for Blog-User permissions',
 411          "CREATE TABLE T_coll_user_perms (
 412              bloguser_blog_ID           int(11) unsigned NOT NULL default 0,
 413              bloguser_user_ID           int(11) unsigned NOT NULL default 0,
 414              bloguser_ismember          tinyint NOT NULL default 0,
 415              bloguser_perm_poststatuses set('published','deprecated','protected','private','draft','redirected') NOT NULL default '',
 416              bloguser_perm_edit         ENUM('no','own','lt','le','all','redirected') NOT NULL default 'no',
 417              bloguser_perm_delpost      tinyint NOT NULL default 0,
 418              bloguser_perm_comments     tinyint NOT NULL default 0,
 419              bloguser_perm_cats         tinyint NOT NULL default 0,
 420              bloguser_perm_properties   tinyint NOT NULL default 0,
 421              bloguser_perm_admin        tinyint NOT NULL default 0,
 422              bloguser_perm_media_upload tinyint NOT NULL default 0,
 423              bloguser_perm_media_browse tinyint NOT NULL default 0,
 424              bloguser_perm_media_change tinyint NOT NULL default 0,
 425              PRIMARY KEY bloguser_pk (bloguser_blog_ID,bloguser_user_ID)
 426          )" ),
 427  
 428      'T_coll_group_perms' => array(
 429          'Creating table for blog-group permissions',
 430          "CREATE TABLE T_coll_group_perms (
 431              bloggroup_blog_ID           int(11) unsigned NOT NULL default 0,
 432              bloggroup_group_ID          int(11) unsigned NOT NULL default 0,
 433              bloggroup_ismember          tinyint NOT NULL default 0,
 434              bloggroup_perm_poststatuses set('published','deprecated','protected','private','draft','redirected') NOT NULL default '',
 435              bloggroup_perm_edit         ENUM('no','own','lt','le','all','redirected') NOT NULL default 'no',
 436              bloggroup_perm_delpost      tinyint NOT NULL default 0,
 437              bloggroup_perm_comments     tinyint NOT NULL default 0,
 438              bloggroup_perm_cats         tinyint NOT NULL default 0,
 439              bloggroup_perm_properties   tinyint NOT NULL default 0,
 440              bloggroup_perm_admin        tinyint NOT NULL default 0,
 441              bloggroup_perm_media_upload tinyint NOT NULL default 0,
 442              bloggroup_perm_media_browse tinyint NOT NULL default 0,
 443              bloggroup_perm_media_change tinyint NOT NULL default 0,
 444              PRIMARY KEY bloggroup_pk (bloggroup_blog_ID,bloggroup_group_ID)
 445          )" ),
 446  
 447      'T_links' => array(
 448          'Creating table for Post Links',
 449          "CREATE TABLE T_links (
 450              link_ID               int(11) unsigned  not null AUTO_INCREMENT,
 451              link_datecreated      datetime          not null,
 452              link_datemodified     datetime          not null,
 453              link_creator_user_ID  int(11) unsigned  not null,
 454              link_lastedit_user_ID int(11) unsigned  not null,
 455              link_itm_ID           int(11) unsigned  NOT NULL,
 456              link_dest_itm_ID      int(11) unsigned  NULL,
 457              link_file_ID          int(11) unsigned  NULL,
 458              link_ltype_ID         int(11) unsigned  NOT NULL default 1,
 459              link_external_url     VARCHAR(255)      NULL,
 460              link_title            TEXT              NULL,
 461              PRIMARY KEY (link_ID),
 462              INDEX link_itm_ID( link_itm_ID ),
 463              INDEX link_dest_itm_ID (link_dest_itm_ID),
 464              INDEX link_file_ID (link_file_ID)
 465          )" ),
 466  
 467      'T_filetypes' => array(
 468          'Creating table for file types',
 469          'CREATE TABLE T_filetypes (
 470              ftyp_ID int(11) unsigned NOT NULL auto_increment,
 471              ftyp_extensions varchar(30) NOT NULL,
 472              ftyp_name varchar(30) NOT NULL,
 473              ftyp_mimetype varchar(50) NOT NULL,
 474              ftyp_icon varchar(20) default NULL,
 475              ftyp_viewtype varchar(10) NOT NULL,
 476              ftyp_allowed tinyint(1) NOT NULL default 0,
 477              PRIMARY KEY (ftyp_ID)
 478          )' ),
 479  
 480      'T_plugins' => array(
 481          'Creating plugins table',
 482          "CREATE TABLE T_plugins (
 483              plug_ID              INT(11) UNSIGNED NOT NULL auto_increment,
 484              plug_priority        TINYINT NOT NULL default 50,
 485              plug_classname       VARCHAR(40) NOT NULL default '',
 486              plug_code            VARCHAR(32) NULL,
 487              plug_apply_rendering ENUM( 'stealth', 'always', 'opt-out', 'opt-in', 'lazy', 'never' ) NOT NULL DEFAULT 'never',
 488              plug_version         VARCHAR(42) NOT NULL default '0',
 489              plug_name            VARCHAR(255) NULL default NULL,
 490              plug_shortdesc       VARCHAR(255) NULL default NULL,
 491              plug_status          ENUM( 'enabled', 'disabled', 'needs_config', 'broken' ) NOT NULL,
 492              plug_spam_weight     TINYINT UNSIGNED NOT NULL DEFAULT 1,
 493              PRIMARY KEY ( plug_ID ),
 494              UNIQUE plug_code( plug_code ),
 495              INDEX plug_status( plug_status )
 496          )" ),
 497  
 498      'T_pluginsettings' => array(
 499          'Creating plugin settings table',
 500          'CREATE TABLE T_pluginsettings (
 501              pset_plug_ID INT(11) UNSIGNED NOT NULL,
 502              pset_name VARCHAR( 30 ) NOT NULL,
 503              pset_value TEXT NULL,
 504              PRIMARY KEY ( pset_plug_ID, pset_name )
 505          )' ),
 506  
 507      'T_pluginusersettings' => array(
 508          'Creating plugin user settings table',
 509          'CREATE TABLE T_pluginusersettings (
 510              puset_plug_ID INT(11) UNSIGNED NOT NULL,
 511              puset_user_ID INT(11) UNSIGNED NOT NULL,
 512              puset_name VARCHAR( 30 ) NOT NULL,
 513              puset_value TEXT NULL,
 514              PRIMARY KEY ( puset_plug_ID, puset_user_ID, puset_name )
 515          )' ),
 516  
 517      'T_pluginevents' => array(
 518          'Creating plugin events table',
 519          'CREATE TABLE T_pluginevents(
 520              pevt_plug_ID INT(11) UNSIGNED NOT NULL,
 521              pevt_event VARCHAR(40) NOT NULL,
 522              pevt_enabled TINYINT NOT NULL DEFAULT 1,
 523              PRIMARY KEY( pevt_plug_ID, pevt_event )
 524          )' ),
 525  
 526      'T_cron__task' => array(
 527          'Creating cron tasks table',
 528          'CREATE TABLE T_cron__task(
 529              ctsk_ID              int(10) unsigned      not null AUTO_INCREMENT,
 530              ctsk_start_datetime  datetime              not null,
 531              ctsk_repeat_after    int(10) unsigned,
 532              ctsk_name            varchar(50)           not null,
 533              ctsk_controller      varchar(50)           not null,
 534              ctsk_params          text,
 535              PRIMARY KEY (ctsk_ID)
 536          )' ),
 537  
 538      'T_cron__log' => array(
 539          'Creating cron tasks table',
 540          'CREATE TABLE T_cron__log(
 541              clog_ctsk_ID              int(10) unsigned   not null,
 542              clog_realstart_datetime   datetime           not null,
 543              clog_realstop_datetime    datetime,
 544              clog_status               enum(\'started\',\'finished\',\'error\',\'timeout\') not null default \'started\',
 545              clog_messages             text,
 546              PRIMARY KEY (clog_ctsk_ID)
 547          )' ),
 548  
 549  );
 550  
 551  
 552  /*

 553   * $Log: _db_schema.inc.php,v $

 554   * Revision 1.70  2007/11/03 22:38:34  fplanque

 555   * no message

 556   *

 557   * Revision 1.69  2007/11/03 21:04:27  fplanque

 558   * skin cleanup

 559   *

 560   * Revision 1.68  2007/11/02 01:52:51  fplanque

 561   * comment ratings

 562   *

 563   * Revision 1.67  2007/09/19 02:54:16  fplanque

 564   * bullet proof upgrade

 565   *

 566   * Revision 1.66  2007/06/26 02:43:16  fplanque

 567   * cleanup

 568   *

 569   * Revision 1.65  2007/06/25 11:02:29  fplanque

 570   * MODULES (refactored MVC)

 571   *

 572   * Revision 1.64  2007/06/03 02:54:18  fplanque

 573   * Stuff for permission maniacs (admin part only, actual perms checks to be implemented)

 574   * Newbies will not see this complexity since advanced perms are now disabled by default.

 575   *

 576   * Revision 1.63  2007/05/31 03:02:23  fplanque

 577   * Advanced perms now disabled by default (simpler interface).

 578   * Except when upgrading.

 579   * Enable advanced perms in blog settings -> features

 580   *

 581   * Revision 1.62  2007/05/29 01:17:20  fplanque

 582   * advanced admin blog settings are now restricted by a special permission

 583   *

 584   * Revision 1.61  2007/05/14 02:47:23  fplanque

 585   * (not so) basic Tags framework

 586   *

 587   * Revision 1.60  2007/05/13 22:03:21  fplanque

 588   * basic excerpt support

 589   *

 590   * Revision 1.59  2007/05/08 00:54:31  fplanque

 591   * public blog list as a widget

 592   *

 593   * Revision 1.58  2007/05/04 21:23:17  fplanque

 594   * no message

 595   *

 596   * Revision 1.57  2007/04/27 09:11:37  fplanque

 597   * saving "spam" referers again (instead of buggy empty referers)

 598   *

 599   * Revision 1.56  2007/04/26 00:11:09  fplanque

 600   * (c) 2007

 601   *

 602   * Revision 1.55  2007/03/25 15:18:57  fplanque

 603   * cleanup

 604   *

 605   * Revision 1.54  2007/03/20 09:53:26  fplanque

 606   * Letting boggers view their own stats.

 607   * + Letthing admins view the aggregate by default.

 608   *

 609   * Revision 1.53  2007/03/11 22:48:19  fplanque

 610   * handling of permission to redirect posts

 611   *

 612   * Revision 1.52  2007/02/13 00:38:11  blueyed

 613   * 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

 614   *

 615   * Revision 1.51  2007/02/03 19:05:36  fplanque

 616   * allow longer posts

 617   *

 618   * Revision 1.50  2007/01/23 04:19:50  fplanque

 619   * handling of blog owners

 620   *

 621   * Revision 1.49  2007/01/15 20:54:57  fplanque

 622   * minor fix

 623   *

 624   * Revision 1.48  2007/01/08 23:45:48  fplanque

 625   * A little less rough widget manager...

 626   * (can handle multiple instances of same widget and remembers order)

 627   *

 628   * Revision 1.47  2007/01/08 21:53:51  fplanque

 629   * typo

 630   *

 631   * Revision 1.46  2007/01/08 02:11:56  fplanque

 632   * Blogs now make use of installed skins

 633   * next step: make use of widgets inside of skins

 634   *

 635   * Revision 1.45  2007/01/07 23:38:20  fplanque

 636   * discovery of skin containers

 637   *

 638   * Revision 1.44  2006/12/29 01:10:06  fplanque

 639   * basic skin registering

 640   *

 641   * Revision 1.43  2006/12/07 20:03:33  fplanque

 642   * Woohoo! File editing... means all skin editing.

 643   *

 644   * Revision 1.42  2006/12/07 16:06:24  fplanque

 645   * prepared new file editing permission

 646   *

 647   * Revision 1.41  2006/12/04 21:25:18  fplanque

 648   * removed user skin switching

 649   *

 650   * Revision 1.40  2006/11/30 22:34:16  fplanque

 651   * bleh

 652   *

 653   * Revision 1.39  2006/11/05 20:13:57  fplanque

 654   * minor

 655   *

 656   * Revision 1.38  2006/10/05 02:42:22  blueyed

 657   * Remove index hit_datetime, because its slow on INSERT (e.g. 1s)

 658   *

 659   * Revision 1.37  2006/10/01 22:11:42  blueyed

 660   * Ping services as plugins.

 661   */
 662  ?>


Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics