b2evolution PHP Cross Reference Blogging Systems

Source: /inc/files/model/_files.install.php - 64 lines - 2158 bytes - Text - Print

Description: This is the install file for the files module

   1  <?php
   2  /**
   3   * This is the install file for the files module
   4   *
   5   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
   6   *
   7   * @package evocore
   8   *
   9   * @version $Id: _files.install.php 6136 2014-03-08 07:59:48Z manuel $
  10   */
  11  if( !defined('EVO_CONFIG_LOADED') ) die( 'Please, do not access this page directly.' );
  12  
  13  
  14  global $db_storage_charset;
  15  
  16  
  17  /**
  18   * The b2evo database scheme.
  19   *
  20   * This gets updated through {@link db_delta()} which generates the queries needed to get
  21   * to this scheme.
  22   *
  23   * Please see {@link db_delta()} for things to take care of.
  24   */
  25  $schema_queries['T_files'] = array(
  26          'Creating table for File Meta Data',
  27          "CREATE TABLE T_files (
  28              file_ID        int(11) unsigned  not null AUTO_INCREMENT,
  29              file_root_type enum('absolute','user','collection','shared','skins') not null default 'absolute',
  30              file_root_ID   int(11) unsigned  not null default 0,
  31              file_path      varchar(255)      not null default '',
  32              file_title     varchar(255),
  33              file_alt       varchar(255),
  34              file_desc      text,
  35              file_hash      char(32) default NULL,
  36              primary key (file_ID),
  37              unique file (file_root_type, file_root_ID, file_path)
  38          ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" );
  39  
  40  $schema_queries['T_filetypes'] = array(
  41          'Creating table for file types',
  42          "CREATE TABLE T_filetypes (
  43              ftyp_ID int(11) unsigned NOT NULL auto_increment,
  44              ftyp_extensions varchar(30) NOT NULL,
  45              ftyp_name varchar(30) NOT NULL,
  46              ftyp_mimetype varchar(50) NOT NULL,
  47              ftyp_icon varchar(20) default NULL,
  48              ftyp_viewtype varchar(10) NOT NULL,
  49              ftyp_allowed enum('any','registered','admin') NOT NULL default 'admin',
  50              PRIMARY KEY (ftyp_ID)
  51          ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" );
  52  
  53  $schema_queries['T_files__vote'] = array(
  54          'Creating table for file votes',
  55          "CREATE TABLE T_files__vote (
  56              fvot_file_ID       int(11) UNSIGNED NOT NULL,
  57              fvot_user_ID       int(11) UNSIGNED NOT NULL,
  58              fvot_like          tinyint(1),
  59              fvot_inappropriate tinyint(1),
  60              fvot_spam          tinyint(1),
  61              primary key (fvot_file_ID, fvot_user_ID)
  62          ) ENGINE = innodb DEFAULT CHARSET = $db_storage_charset" );
  63  
  64  ?>

title

Description

title

Description

title

Description

title

title

Body