├── README.md ├── employees.sql ├── classicmodels.sql ├── phpwiki.sql ├── wordpress.sql ├── oscommerce.sql ├── sakila.sql ├── mediawiki.sql ├── drupal.sql └── joomla.sql /README.md: -------------------------------------------------------------------------------- 1 | schema 2 | ====== 3 | 4 | Example MySQL Schemas from open-source projects 5 | 6 | You can contribute any schema with the following syntax: 7 | 8 | $ mysqldump -u[user] -p --skip-lock-tables --no-data --databases [schema] > [schema].sql 9 | 10 | 11 | Existing schemas include: 12 | 13 | - wordpress.sql 14 | - drupal.sql 15 | - mediawiki.sql 16 | - joomla.sql 17 | - oscommerce.sql - https://raw.github.com/osCommerce/oscommerce2/master/catalog/install/oscommerce.sql 18 | - ezpublish.sh - https://raw.github.com/ezsystems/ezpublish/master/kernel/sql/mysql/kernel_schema.sql & https://raw.github.com/ezsystems/ezpublish/master/kernel/sql/mysql/cluster_db_schema.sql 19 | - sakila.sql - http://downloads.mysql.com/docs/sakila-db.tar.gz 20 | - employees.sql - http://bazaar.launchpad.net/~sandbox-developers/test-db/employees_db_1/download/head:/employees.sql-20080729220128-yub0xyoby9skmnf3-4/employees.sql 21 | - classicmodels.sql - http://www.mysqltutorial.org/mysql-sample-database.aspx 22 | - magento.sql -- http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/magento_database_diagram 23 | -------------------------------------------------------------------------------- /employees.sql: -------------------------------------------------------------------------------- 1 | -- Sample employee database 2 | -- See changelog table for details 3 | -- Copyright (C) 2007,2008, MySQL AB 4 | -- 5 | -- Original data created by Fusheng Wang and Carlo Zaniolo 6 | -- http://www.cs.aau.dk/TimeCenter/software.htm 7 | -- http://www.cs.aau.dk/TimeCenter/Data/employeeTemporalDataSet.zip 8 | -- 9 | -- Current schema by Giuseppe Maxia 10 | -- Data conversion from XML to relational by Patrick Crews 11 | -- 12 | -- This work is licensed under the 13 | -- Creative Commons Attribution-Share Alike 3.0 Unported License. 14 | -- To view a copy of this license, visit 15 | -- http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to 16 | -- Creative Commons, 171 Second Street, Suite 300, San Francisco, 17 | -- California, 94105, USA. 18 | -- 19 | -- DISCLAIMER 20 | -- To the best of our knowledge, this data is fabricated, and 21 | -- it does not correspond to real people. 22 | -- Any similarity to existing people is purely coincidental. 23 | -- 24 | 25 | DROP DATABASE IF EXISTS employees; 26 | CREATE DATABASE IF NOT EXISTS employees; 27 | USE employees; 28 | 29 | 30 | DROP TABLE IF EXISTS dept_emp, 31 | dept_manager, 32 | titles, 33 | salaries, 34 | employees, 35 | departments; 36 | 37 | set storage_engine = InnoDB; 38 | -- set storage_engine = MyISAM; 39 | -- set storage_engine = Falcon; 40 | -- set storage_engine = PBXT; 41 | -- set storage_engine = Maria; 42 | 43 | 44 | CREATE TABLE employees ( 45 | emp_no INT NOT NULL, 46 | birth_date DATE NOT NULL, 47 | first_name VARCHAR(14) NOT NULL, 48 | last_name VARCHAR(16) NOT NULL, 49 | gender ENUM ('M','F') NOT NULL, 50 | hire_date DATE NOT NULL, 51 | PRIMARY KEY (emp_no) 52 | ); 53 | 54 | CREATE TABLE departments ( 55 | dept_no CHAR(4) NOT NULL, 56 | dept_name VARCHAR(40) NOT NULL, 57 | PRIMARY KEY (dept_no), 58 | UNIQUE KEY (dept_name) 59 | ); 60 | 61 | CREATE TABLE dept_manager ( 62 | dept_no CHAR(4) NOT NULL, 63 | emp_no INT NOT NULL, 64 | from_date DATE NOT NULL, 65 | to_date DATE NOT NULL, 66 | KEY (emp_no), 67 | KEY (dept_no), 68 | FOREIGN KEY (emp_no) REFERENCES employees (emp_no) ON DELETE CASCADE, 69 | FOREIGN KEY (dept_no) REFERENCES departments (dept_no) ON DELETE CASCADE, 70 | PRIMARY KEY (emp_no,dept_no) 71 | ); 72 | 73 | CREATE TABLE dept_emp ( 74 | emp_no INT NOT NULL, 75 | dept_no CHAR(4) NOT NULL, 76 | from_date DATE NOT NULL, 77 | to_date DATE NOT NULL, 78 | KEY (emp_no), 79 | KEY (dept_no), 80 | FOREIGN KEY (emp_no) REFERENCES employees (emp_no) ON DELETE CASCADE, 81 | FOREIGN KEY (dept_no) REFERENCES departments (dept_no) ON DELETE CASCADE, 82 | PRIMARY KEY (emp_no,dept_no) 83 | ); 84 | 85 | CREATE TABLE titles ( 86 | emp_no INT NOT NULL, 87 | title VARCHAR(50) NOT NULL, 88 | from_date DATE NOT NULL, 89 | to_date DATE, 90 | KEY (emp_no), 91 | FOREIGN KEY (emp_no) REFERENCES employees (emp_no) ON DELETE CASCADE, 92 | PRIMARY KEY (emp_no,title, from_date) 93 | ); 94 | 95 | CREATE TABLE salaries ( 96 | emp_no INT NOT NULL, 97 | salary INT NOT NULL, 98 | from_date DATE NOT NULL, 99 | to_date DATE NOT NULL, 100 | KEY (emp_no), 101 | FOREIGN KEY (emp_no) REFERENCES employees (emp_no) ON DELETE CASCADE, 102 | PRIMARY KEY (emp_no, from_date) 103 | ); 104 | -------------------------------------------------------------------------------- /classicmodels.sql: -------------------------------------------------------------------------------- 1 | /* 2 | SQLyog Community Edition- MySQL GUI v7.02 3 | MySQL - 5.0.51b-community-nt : Database - classicmodels 4 | ********************************************************************* 5 | */ 6 | 7 | /*!40101 SET NAMES utf8 */; 8 | 9 | /*!40101 SET SQL_MODE=''*/; 10 | 11 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 12 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 13 | 14 | CREATE DATABASE /*!32312 IF NOT EXISTS*/`classicmodels` /*!40100 DEFAULT CHARACTER SET latin1 */; 15 | 16 | USE `classicmodels`; 17 | 18 | /*Table structure for table `customers` */ 19 | 20 | DROP TABLE IF EXISTS `customers`; 21 | 22 | CREATE TABLE `customers` ( 23 | `customerNumber` int(11) NOT NULL, 24 | `customerName` varchar(50) NOT NULL, 25 | `contactLastName` varchar(50) NOT NULL, 26 | `contactFirstName` varchar(50) NOT NULL, 27 | `phone` varchar(50) NOT NULL, 28 | `addressLine1` varchar(50) NOT NULL, 29 | `addressLine2` varchar(50) default NULL, 30 | `city` varchar(50) NOT NULL, 31 | `state` varchar(50) default NULL, 32 | `postalCode` varchar(15) default NULL, 33 | `country` varchar(50) NOT NULL, 34 | `salesRepEmployeeNumber` int(11) default NULL, 35 | `creditLimit` double default NULL, 36 | PRIMARY KEY (`customerNumber`) 37 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 38 | 39 | /*Data for the table `customers` */ 40 | 41 | 42 | /*Table structure for table `employees` */ 43 | 44 | DROP TABLE IF EXISTS `employees`; 45 | 46 | CREATE TABLE `employees` ( 47 | `employeeNumber` int(11) NOT NULL, 48 | `lastName` varchar(50) NOT NULL, 49 | `firstName` varchar(50) NOT NULL, 50 | `extension` varchar(10) NOT NULL, 51 | `email` varchar(100) NOT NULL, 52 | `officeCode` varchar(10) NOT NULL, 53 | `reportsTo` int(11) default NULL, 54 | `jobTitle` varchar(50) NOT NULL, 55 | PRIMARY KEY (`employeeNumber`) 56 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 57 | 58 | /*Data for the table `employees` */ 59 | 60 | 61 | /*Table structure for table `offices` */ 62 | 63 | DROP TABLE IF EXISTS `offices`; 64 | 65 | CREATE TABLE `offices` ( 66 | `officeCode` varchar(10) NOT NULL, 67 | `city` varchar(50) NOT NULL, 68 | `phone` varchar(50) NOT NULL, 69 | `addressLine1` varchar(50) NOT NULL, 70 | `addressLine2` varchar(50) default NULL, 71 | `state` varchar(50) default NULL, 72 | `country` varchar(50) NOT NULL, 73 | `postalCode` varchar(15) NOT NULL, 74 | `territory` varchar(10) NOT NULL, 75 | PRIMARY KEY (`officeCode`) 76 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 77 | 78 | /*Data for the table `offices` */ 79 | 80 | 81 | /*Table structure for table `orderdetails` */ 82 | 83 | DROP TABLE IF EXISTS `orderdetails`; 84 | 85 | CREATE TABLE `orderdetails` ( 86 | `orderNumber` int(11) NOT NULL, 87 | `productCode` varchar(15) NOT NULL, 88 | `quantityOrdered` int(11) NOT NULL, 89 | `priceEach` double NOT NULL, 90 | `orderLineNumber` smallint(6) NOT NULL, 91 | PRIMARY KEY (`orderNumber`,`productCode`) 92 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 93 | 94 | /*Data for the table `orderdetails` */ 95 | 96 | 97 | /*Table structure for table `orders` */ 98 | 99 | DROP TABLE IF EXISTS `orders`; 100 | 101 | CREATE TABLE `orders` ( 102 | `orderNumber` int(11) NOT NULL, 103 | `orderDate` datetime NOT NULL, 104 | `requiredDate` datetime NOT NULL, 105 | `shippedDate` datetime default NULL, 106 | `status` varchar(15) NOT NULL, 107 | `comments` text, 108 | `customerNumber` int(11) NOT NULL, 109 | PRIMARY KEY (`orderNumber`) 110 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 111 | 112 | /*Data for the table `orders` */ 113 | 114 | 115 | /*Table structure for table `payments` */ 116 | 117 | DROP TABLE IF EXISTS `payments`; 118 | 119 | CREATE TABLE `payments` ( 120 | `customerNumber` int(11) NOT NULL, 121 | `checkNumber` varchar(50) NOT NULL, 122 | `paymentDate` datetime NOT NULL, 123 | `amount` double NOT NULL, 124 | PRIMARY KEY (`customerNumber`,`checkNumber`) 125 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 126 | 127 | /*Data for the table `payments` */ 128 | 129 | 130 | /*Table structure for table `productlines` */ 131 | 132 | DROP TABLE IF EXISTS `productlines`; 133 | 134 | CREATE TABLE `productlines` ( 135 | `productLine` varchar(50) NOT NULL, 136 | `textDescription` varchar(4000) default NULL, 137 | `htmlDescription` mediumtext, 138 | `image` mediumblob, 139 | PRIMARY KEY (`productLine`) 140 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 141 | 142 | /*Data for the table `productlines` */ 143 | 144 | 145 | /*Table structure for table `products` */ 146 | 147 | DROP TABLE IF EXISTS `products`; 148 | 149 | CREATE TABLE `products` ( 150 | `productCode` varchar(15) NOT NULL, 151 | `productName` varchar(70) NOT NULL, 152 | `productLine` varchar(50) NOT NULL, 153 | `productScale` varchar(10) NOT NULL, 154 | `productVendor` varchar(50) NOT NULL, 155 | `productDescription` text NOT NULL, 156 | `quantityInStock` smallint(6) NOT NULL, 157 | `buyPrice` double NOT NULL, 158 | `MSRP` double NOT NULL, 159 | PRIMARY KEY (`productCode`) 160 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 161 | 162 | /*Data for the table `products` */ 163 | 164 | 165 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 166 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 167 | -------------------------------------------------------------------------------- /phpwiki.sql: -------------------------------------------------------------------------------- 1 | -- $Id: mysql-initialize.sql 7117 2009-09-15 08:02:20Z rurban $ 2 | 3 | CREATE TABLE page ( 4 | id INT NOT NULL AUTO_INCREMENT, 5 | -- for mysql => 4.1 define the charset here 6 | -- this is esp. needed for mysql 4.1.0 up to 4.1.6. 7 | -- not yet confirmed, at least since 4.1.8 it's okay with binary. 8 | -- pagename VARCHAR(100) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, 9 | -- otherwise use the old syntax to do case-sensitive comparison 10 | pagename VARCHAR(100) BINARY NOT NULL, 11 | hits INT NOT NULL DEFAULT 0, 12 | pagedata MEDIUMTEXT NOT NULL DEFAULT '', 13 | -- dont add that by hand, better let action=upgrade convert your data 14 | cached_html MEDIUMBLOB, 15 | PRIMARY KEY (id), 16 | UNIQUE KEY (pagename) 17 | ); 18 | 19 | CREATE TABLE version ( 20 | id INT NOT NULL, 21 | version INT NOT NULL, 22 | mtime INT NOT NULL, 23 | minor_edit TINYINT DEFAULT 0, 24 | content MEDIUMTEXT NOT NULL DEFAULT '', 25 | versiondata MEDIUMTEXT NOT NULL DEFAULT '', 26 | PRIMARY KEY (id,version), 27 | INDEX (mtime) 28 | ); 29 | 30 | CREATE TABLE recent ( 31 | id INT NOT NULL, 32 | latestversion INT, 33 | latestmajor INT, 34 | latestminor INT, 35 | PRIMARY KEY (id) 36 | ); 37 | 38 | CREATE TABLE nonempty ( 39 | id INT NOT NULL, 40 | PRIMARY KEY (id) 41 | ); 42 | 43 | CREATE TABLE link ( 44 | linkfrom INT NOT NULL, 45 | linkto INT NOT NULL, 46 | relation INT DEFAULT 0, 47 | INDEX (linkfrom), 48 | INDEX (linkto), 49 | INDEX (relation) 50 | ); 51 | 52 | CREATE TABLE session ( 53 | sess_id CHAR(32) NOT NULL DEFAULT '', 54 | sess_data BLOB NOT NULL, 55 | sess_date INT UNSIGNED NOT NULL, 56 | sess_ip CHAR(40) NOT NULL, 57 | PRIMARY KEY (sess_id), 58 | INDEX (sess_date) 59 | ); 60 | 61 | -- upgrade to 1.3.8: (see lib/upgrade.php) 62 | -- ALTER TABLE session ADD sess_ip CHAR(15) NOT NULL; 63 | -- CREATE INDEX sess_date on session (sess_date); 64 | -- update to 1.3.10: (see lib/upgrade.php) 65 | -- ALTER TABLE page CHANGE id id INT NOT NULL AUTO_INCREMENT; 66 | -- update to 1.3.11: (see lib/upgrade.php) 67 | -- ALTER TABLE page ADD cached_html MEDIUMBLOB; 68 | -- ALTER TABLE session CHANGE sess_ip sess_ip CHAR(40) NOT NULL; 69 | 70 | -- Optional DB Auth and Prefs 71 | -- For these tables below the default table prefix must be used 72 | -- in the DBAuthParam SQL statements also. 73 | 74 | CREATE TABLE pref ( 75 | userid VARCHAR(48) BINARY NOT NULL UNIQUE, 76 | prefs TEXT NULL DEFAULT '', 77 | passwd VARCHAR(48) BINARY DEFAULT '', 78 | groupname VARCHAR(48) BINARY DEFAULT 'users', 79 | PRIMARY KEY (userid) 80 | ); 81 | 82 | -- update to 1.3.12: (see lib/upgrade.php) 83 | 84 | -- ALTER TABLE pref ADD passwd CHAR(48) BINARY DEFAULT ''; 85 | -- ALTER TABLE pref ADD groupname CHAR(48) BINARY DEFAULT 'users'; 86 | 87 | -- deprecated since 1.3.12. only useful for seperate databases. 88 | -- better use the extra pref table where such users can be created easily 89 | -- without password. 90 | 91 | -- CREATE TABLE user ( 92 | -- userid CHAR(48) BINARY NOT NULL UNIQUE, 93 | -- passwd CHAR(48) BINARY DEFAULT '', 94 | -- prefs TEXT NULL DEFAULT '', 95 | -- groupname CHAR(48) BINARY DEFAULT 'users', 96 | -- PRIMARY KEY (userid) 97 | -- ); 98 | 99 | -- Use the member table, if you need it for n:m user-group relations, 100 | -- and adjust your DBAUTH_AUTH_ SQL statements. 101 | 102 | CREATE TABLE member ( 103 | userid CHAR(48) BINARY NOT NULL, 104 | groupname CHAR(48) BINARY NOT NULL DEFAULT 'users', 105 | INDEX (userid), 106 | INDEX (groupname) 107 | ); 108 | 109 | -- only if you plan to use the wikilens theme 110 | CREATE TABLE rating ( 111 | dimension INT(4) NOT NULL, 112 | raterpage INT(11) NOT NULL, 113 | rateepage INT(11) NOT NULL, 114 | ratingvalue FLOAT NOT NULL, 115 | rateeversion INT(11) NOT NULL, 116 | tstamp TIMESTAMP, 117 | -- before: 118 | -- tstamp TIMESTAMP(14) NOT NULL, 119 | -- since mysql 5.1 better use: 120 | -- tstamp TIMESTAMP DEFAULT 0, 121 | PRIMARY KEY (dimension, raterpage, rateepage) 122 | ); 123 | -- for empty dimensions use extra indices. see lib/wikilens/RatingsDb.php 124 | CREATE INDEX rating_dimension ON rating (dimension); 125 | CREATE INDEX rating_raterpage ON rating (raterpage); 126 | CREATE INDEX rating_rateepage ON rating (rateepage); 127 | 128 | -- if ACCESS_LOG_SQL > 0 129 | -- only if you need fast log-analysis (spam prevention, recent referrers) 130 | -- see http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/#id2756178 131 | CREATE TABLE accesslog ( 132 | time_stamp INT UNSIGNED, 133 | remote_host VARCHAR(100), 134 | remote_user VARCHAR(50), 135 | request_method VARCHAR(10), 136 | request_line VARCHAR(255), 137 | request_args VARCHAR(255), 138 | request_file VARCHAR(255), 139 | request_uri VARCHAR(255), 140 | request_time CHAR(28), 141 | status SMALLINT UNSIGNED, 142 | bytes_sent SMALLINT UNSIGNED, 143 | referer VARCHAR(255), 144 | agent VARCHAR(255), 145 | request_duration FLOAT 146 | ); 147 | CREATE INDEX log_time ON accesslog (time_stamp); 148 | CREATE INDEX log_host ON accesslog (remote_host); 149 | -- create extra indices on demand (usually referer. see plugin/AccessLogSql) 150 | 151 | -- upgrade to 1.3.13: ( forgotten in lib/upgrade.php! ) 152 | -- ALTER TABLE accesslog CHANGE remote_host VARCHAR(100); 153 | 154 | -- ALTER TABLE link ADD relation INT DEFAULT 0; 155 | -- CREATE INDEX link_relation ON link (relation); 156 | -------------------------------------------------------------------------------- /wordpress.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.1.47, for unknown-linux-gnu (x86_64) 2 | -- 3 | -- Host: localhost Database: wordpress 4 | -- ------------------------------------------------------ 5 | -- Server version 5.5.8-log 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Current Database: `wordpress` 20 | -- 21 | 22 | CREATE DATABASE /*!32312 IF NOT EXISTS*/ `wordpress` /*!40100 DEFAULT CHARACTER SET latin1 */; 23 | 24 | USE `wordpress`; 25 | 26 | -- 27 | -- Table structure for table `wp_commentmeta` 28 | -- 29 | 30 | DROP TABLE IF EXISTS `wp_commentmeta`; 31 | /*!40101 SET @saved_cs_client = @@character_set_client */; 32 | /*!40101 SET character_set_client = utf8 */; 33 | CREATE TABLE `wp_commentmeta` ( 34 | `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 35 | `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0', 36 | `meta_key` varchar(255) DEFAULT NULL, 37 | `meta_value` longtext, 38 | PRIMARY KEY (`meta_id`), 39 | KEY `comment_id` (`comment_id`), 40 | KEY `meta_key` (`meta_key`) 41 | ) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8; 42 | /*!40101 SET character_set_client = @saved_cs_client */; 43 | 44 | -- 45 | -- Table structure for table `wp_comments` 46 | -- 47 | 48 | DROP TABLE IF EXISTS `wp_comments`; 49 | /*!40101 SET @saved_cs_client = @@character_set_client */; 50 | /*!40101 SET character_set_client = utf8 */; 51 | CREATE TABLE `wp_comments` ( 52 | `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 53 | `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0', 54 | `comment_author` tinytext NOT NULL, 55 | `comment_author_email` varchar(100) NOT NULL DEFAULT '', 56 | `comment_author_url` varchar(200) NOT NULL DEFAULT '', 57 | `comment_author_IP` varchar(100) NOT NULL DEFAULT '', 58 | `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 59 | `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 60 | `comment_content` text NOT NULL, 61 | `comment_karma` int(11) NOT NULL DEFAULT '0', 62 | `comment_approved` varchar(20) NOT NULL DEFAULT '1', 63 | `comment_agent` varchar(255) NOT NULL DEFAULT '', 64 | `comment_type` varchar(20) NOT NULL DEFAULT '', 65 | `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0', 66 | `user_id` bigint(20) unsigned NOT NULL DEFAULT '0', 67 | PRIMARY KEY (`comment_ID`), 68 | KEY `comment_approved` (`comment_approved`), 69 | KEY `comment_post_ID` (`comment_post_ID`), 70 | KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`), 71 | KEY `comment_date_gmt` (`comment_date_gmt`), 72 | KEY `comment_parent` (`comment_parent`) 73 | ) ENGINE=MyISAM AUTO_INCREMENT=16439 DEFAULT CHARSET=utf8; 74 | /*!40101 SET character_set_client = @saved_cs_client */; 75 | 76 | -- 77 | -- Table structure for table `wp_ec3_schedule` 78 | -- 79 | 80 | DROP TABLE IF EXISTS `wp_ec3_schedule`; 81 | /*!40101 SET @saved_cs_client = @@character_set_client */; 82 | /*!40101 SET character_set_client = utf8 */; 83 | CREATE TABLE `wp_ec3_schedule` ( 84 | `sched_id` bigint(20) NOT NULL AUTO_INCREMENT, 85 | `post_id` bigint(20) DEFAULT NULL, 86 | `start` datetime DEFAULT NULL, 87 | `end` datetime DEFAULT NULL, 88 | `allday` tinyint(1) DEFAULT NULL, 89 | `rpt` varchar(64) DEFAULT NULL, 90 | PRIMARY KEY (`sched_id`) 91 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 92 | /*!40101 SET character_set_client = @saved_cs_client */; 93 | 94 | -- 95 | -- Table structure for table `wp_links` 96 | -- 97 | 98 | DROP TABLE IF EXISTS `wp_links`; 99 | /*!40101 SET @saved_cs_client = @@character_set_client */; 100 | /*!40101 SET character_set_client = utf8 */; 101 | CREATE TABLE `wp_links` ( 102 | `link_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 103 | `link_url` varchar(255) NOT NULL DEFAULT '', 104 | `link_name` varchar(255) NOT NULL DEFAULT '', 105 | `link_image` varchar(255) NOT NULL DEFAULT '', 106 | `link_target` varchar(25) NOT NULL DEFAULT '', 107 | `link_description` varchar(255) NOT NULL DEFAULT '', 108 | `link_visible` varchar(20) NOT NULL DEFAULT 'Y', 109 | `link_owner` bigint(20) unsigned NOT NULL DEFAULT '1', 110 | `link_rating` int(11) NOT NULL DEFAULT '0', 111 | `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 112 | `link_rel` varchar(255) NOT NULL DEFAULT '', 113 | `link_notes` mediumtext NOT NULL, 114 | `link_rss` varchar(255) NOT NULL DEFAULT '', 115 | PRIMARY KEY (`link_id`), 116 | KEY `link_visible` (`link_visible`) 117 | ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; 118 | /*!40101 SET character_set_client = @saved_cs_client */; 119 | 120 | -- 121 | -- Table structure for table `wp_options` 122 | -- 123 | 124 | DROP TABLE IF EXISTS `wp_options`; 125 | /*!40101 SET @saved_cs_client = @@character_set_client */; 126 | /*!40101 SET character_set_client = utf8 */; 127 | CREATE TABLE `wp_options` ( 128 | `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 129 | `blog_id` int(11) NOT NULL DEFAULT '0', 130 | `option_name` varchar(64) NOT NULL DEFAULT '', 131 | `option_value` longtext NOT NULL, 132 | `autoload` varchar(20) NOT NULL DEFAULT 'yes', 133 | PRIMARY KEY (`option_id`), 134 | UNIQUE KEY `option_name` (`option_name`) 135 | ) ENGINE=MyISAM AUTO_INCREMENT=19306 DEFAULT CHARSET=utf8; 136 | /*!40101 SET character_set_client = @saved_cs_client */; 137 | 138 | -- 139 | -- Table structure for table `wp_postmeta` 140 | -- 141 | 142 | DROP TABLE IF EXISTS `wp_postmeta`; 143 | /*!40101 SET @saved_cs_client = @@character_set_client */; 144 | /*!40101 SET character_set_client = utf8 */; 145 | CREATE TABLE `wp_postmeta` ( 146 | `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 147 | `post_id` bigint(20) unsigned NOT NULL DEFAULT '0', 148 | `meta_key` varchar(255) DEFAULT NULL, 149 | `meta_value` longtext, 150 | PRIMARY KEY (`meta_id`), 151 | KEY `post_id` (`post_id`), 152 | KEY `meta_key` (`meta_key`) 153 | ) ENGINE=MyISAM AUTO_INCREMENT=2816 DEFAULT CHARSET=utf8; 154 | /*!40101 SET character_set_client = @saved_cs_client */; 155 | 156 | -- 157 | -- Table structure for table `wp_posts` 158 | -- 159 | 160 | DROP TABLE IF EXISTS `wp_posts`; 161 | /*!40101 SET @saved_cs_client = @@character_set_client */; 162 | /*!40101 SET character_set_client = utf8 */; 163 | CREATE TABLE `wp_posts` ( 164 | `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 165 | `post_author` bigint(20) unsigned NOT NULL DEFAULT '0', 166 | `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 167 | `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 168 | `post_content` longtext NOT NULL, 169 | `post_title` text NOT NULL, 170 | `post_excerpt` text NOT NULL, 171 | `post_status` varchar(20) NOT NULL DEFAULT 'publish', 172 | `comment_status` varchar(20) NOT NULL DEFAULT 'open', 173 | `ping_status` varchar(20) NOT NULL DEFAULT 'open', 174 | `post_password` varchar(20) NOT NULL DEFAULT '', 175 | `post_name` varchar(200) NOT NULL DEFAULT '', 176 | `to_ping` text NOT NULL, 177 | `pinged` text NOT NULL, 178 | `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 179 | `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 180 | `post_content_filtered` text NOT NULL, 181 | `post_parent` bigint(20) unsigned NOT NULL DEFAULT '0', 182 | `guid` varchar(255) NOT NULL DEFAULT '', 183 | `menu_order` int(11) NOT NULL DEFAULT '0', 184 | `post_type` varchar(20) NOT NULL DEFAULT 'post', 185 | `post_mime_type` varchar(100) NOT NULL DEFAULT '', 186 | `comment_count` bigint(20) NOT NULL DEFAULT '0', 187 | PRIMARY KEY (`ID`), 188 | KEY `post_name` (`post_name`), 189 | KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`), 190 | KEY `post_parent` (`post_parent`), 191 | KEY `post_author` (`post_author`) 192 | ) ENGINE=InnoDB AUTO_INCREMENT=4172 DEFAULT CHARSET=utf8; 193 | /*!40101 SET character_set_client = @saved_cs_client */; 194 | 195 | -- 196 | -- Table structure for table `wp_term_relationships` 197 | -- 198 | 199 | DROP TABLE IF EXISTS `wp_term_relationships`; 200 | /*!40101 SET @saved_cs_client = @@character_set_client */; 201 | /*!40101 SET character_set_client = utf8 */; 202 | CREATE TABLE `wp_term_relationships` ( 203 | `object_id` bigint(20) unsigned NOT NULL DEFAULT '0', 204 | `term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT '0', 205 | `term_order` int(11) NOT NULL DEFAULT '0', 206 | PRIMARY KEY (`object_id`,`term_taxonomy_id`), 207 | KEY `term_taxonomy_id` (`term_taxonomy_id`) 208 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 209 | /*!40101 SET character_set_client = @saved_cs_client */; 210 | 211 | -- 212 | -- Table structure for table `wp_term_taxonomy` 213 | -- 214 | 215 | DROP TABLE IF EXISTS `wp_term_taxonomy`; 216 | /*!40101 SET @saved_cs_client = @@character_set_client */; 217 | /*!40101 SET character_set_client = utf8 */; 218 | CREATE TABLE `wp_term_taxonomy` ( 219 | `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 220 | `term_id` bigint(20) unsigned NOT NULL DEFAULT '0', 221 | `taxonomy` varchar(32) NOT NULL DEFAULT '', 222 | `description` longtext NOT NULL, 223 | `parent` bigint(20) unsigned NOT NULL DEFAULT '0', 224 | `count` bigint(20) NOT NULL DEFAULT '0', 225 | PRIMARY KEY (`term_taxonomy_id`), 226 | UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`), 227 | KEY `taxonomy` (`taxonomy`) 228 | ) ENGINE=MyISAM AUTO_INCREMENT=642 DEFAULT CHARSET=utf8; 229 | /*!40101 SET character_set_client = @saved_cs_client */; 230 | 231 | -- 232 | -- Table structure for table `wp_terms` 233 | -- 234 | 235 | DROP TABLE IF EXISTS `wp_terms`; 236 | /*!40101 SET @saved_cs_client = @@character_set_client */; 237 | /*!40101 SET character_set_client = utf8 */; 238 | CREATE TABLE `wp_terms` ( 239 | `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 240 | `name` varchar(200) NOT NULL DEFAULT '', 241 | `slug` varchar(200) NOT NULL DEFAULT '', 242 | `term_group` bigint(10) NOT NULL DEFAULT '0', 243 | PRIMARY KEY (`term_id`), 244 | UNIQUE KEY `slug` (`slug`), 245 | KEY `name` (`name`) 246 | ) ENGINE=MyISAM AUTO_INCREMENT=603 DEFAULT CHARSET=utf8; 247 | /*!40101 SET character_set_client = @saved_cs_client */; 248 | 249 | -- 250 | -- Table structure for table `wp_usermeta` 251 | -- 252 | 253 | DROP TABLE IF EXISTS `wp_usermeta`; 254 | /*!40101 SET @saved_cs_client = @@character_set_client */; 255 | /*!40101 SET character_set_client = utf8 */; 256 | CREATE TABLE `wp_usermeta` ( 257 | `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 258 | `user_id` bigint(20) unsigned NOT NULL DEFAULT '0', 259 | `meta_key` varchar(255) DEFAULT NULL, 260 | `meta_value` longtext, 261 | PRIMARY KEY (`umeta_id`), 262 | KEY `user_id` (`user_id`), 263 | KEY `meta_key` (`meta_key`) 264 | ) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; 265 | /*!40101 SET character_set_client = @saved_cs_client */; 266 | 267 | -- 268 | -- Table structure for table `wp_users` 269 | -- 270 | 271 | DROP TABLE IF EXISTS `wp_users`; 272 | /*!40101 SET @saved_cs_client = @@character_set_client */; 273 | /*!40101 SET character_set_client = utf8 */; 274 | CREATE TABLE `wp_users` ( 275 | `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 276 | `user_login` varchar(60) NOT NULL DEFAULT '', 277 | `user_pass` varchar(64) NOT NULL DEFAULT '', 278 | `user_nicename` varchar(50) NOT NULL DEFAULT '', 279 | `user_email` varchar(100) NOT NULL DEFAULT '', 280 | `user_url` varchar(100) NOT NULL DEFAULT '', 281 | `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 282 | `user_activation_key` varchar(60) NOT NULL DEFAULT '', 283 | `user_status` int(11) NOT NULL DEFAULT '0', 284 | `display_name` varchar(250) NOT NULL DEFAULT '', 285 | PRIMARY KEY (`ID`), 286 | KEY `user_login_key` (`user_login`), 287 | KEY `user_nicename` (`user_nicename`) 288 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 289 | /*!40101 SET character_set_client = @saved_cs_client */; 290 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 291 | 292 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 293 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 294 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 295 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 296 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 297 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 298 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 299 | 300 | -- Dump completed on 2012-11-22 12:24:56 301 | -------------------------------------------------------------------------------- /oscommerce.sql: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # osCommerce, Open Source E-Commerce Solutions 4 | # http://www.oscommerce.com 5 | # 6 | # Copyright (c) 2008 osCommerce 7 | # 8 | # Released under the GNU General Public License 9 | # 10 | # NOTE: * Please make any modifications to this file by hand! 11 | # * DO NOT use a mysqldump created file for new changes! 12 | # * Please take note of the table structure, and use this 13 | # structure as a standard for future modifications! 14 | # * Any tables you add here should be added in admin/backup.php 15 | # and in catalog/install/includes/functions/database.php 16 | # * To see the 'diff'erence between MySQL databases, use 17 | # the mysqldiff perl script located in the extras 18 | # directory of the 'catalog' module. 19 | # * Comments should be like these, full line comments. 20 | # (don't use inline comments) 21 | 22 | CREATE SCHEMA IF NOT EXISTS oscommerce; 23 | USE oscommerce; 24 | 25 | DROP TABLE IF EXISTS action_recorder; 26 | CREATE TABLE action_recorder ( 27 | id int NOT NULL auto_increment, 28 | module varchar(255) NOT NULL, 29 | user_id int, 30 | user_name varchar(255), 31 | identifier varchar(255) NOT NULL, 32 | success char(1), 33 | date_added datetime NOT NULL, 34 | PRIMARY KEY (id), 35 | KEY idx_action_recorder_module (module), 36 | KEY idx_action_recorder_user_id (user_id), 37 | KEY idx_action_recorder_identifier (identifier), 38 | KEY idx_action_recorder_date_added (date_added) 39 | ); 40 | 41 | DROP TABLE IF EXISTS address_book; 42 | CREATE TABLE address_book ( 43 | address_book_id int NOT NULL auto_increment, 44 | customers_id int NOT NULL, 45 | entry_gender char(1), 46 | entry_company varchar(255), 47 | entry_firstname varchar(255) NOT NULL, 48 | entry_lastname varchar(255) NOT NULL, 49 | entry_street_address varchar(255) NOT NULL, 50 | entry_suburb varchar(255), 51 | entry_postcode varchar(255) NOT NULL, 52 | entry_city varchar(255) NOT NULL, 53 | entry_state varchar(255), 54 | entry_country_id int DEFAULT '0' NOT NULL, 55 | entry_zone_id int DEFAULT '0' NOT NULL, 56 | PRIMARY KEY (address_book_id), 57 | KEY idx_address_book_customers_id (customers_id) 58 | ); 59 | 60 | DROP TABLE IF EXISTS address_format; 61 | CREATE TABLE address_format ( 62 | address_format_id int NOT NULL auto_increment, 63 | address_format varchar(128) NOT NULL, 64 | address_summary varchar(48) NOT NULL, 65 | PRIMARY KEY (address_format_id) 66 | ); 67 | 68 | DROP TABLE IF EXISTS administrators; 69 | CREATE TABLE administrators ( 70 | id int NOT NULL auto_increment, 71 | user_name varchar(255) binary NOT NULL, 72 | user_password varchar(60) NOT NULL, 73 | PRIMARY KEY (id) 74 | ); 75 | 76 | DROP TABLE IF EXISTS banners; 77 | CREATE TABLE banners ( 78 | banners_id int NOT NULL auto_increment, 79 | banners_title varchar(64) NOT NULL, 80 | banners_url varchar(255) NOT NULL, 81 | banners_image varchar(64) NOT NULL, 82 | banners_group varchar(10) NOT NULL, 83 | banners_html_text text, 84 | expires_impressions int(7) DEFAULT '0', 85 | expires_date datetime DEFAULT NULL, 86 | date_scheduled datetime DEFAULT NULL, 87 | date_added datetime NOT NULL, 88 | date_status_change datetime DEFAULT NULL, 89 | status int(1) DEFAULT '1' NOT NULL, 90 | PRIMARY KEY (banners_id), 91 | KEY idx_banners_group (banners_group) 92 | ); 93 | 94 | DROP TABLE IF EXISTS banners_history; 95 | CREATE TABLE banners_history ( 96 | banners_history_id int NOT NULL auto_increment, 97 | banners_id int NOT NULL, 98 | banners_shown int(5) NOT NULL DEFAULT '0', 99 | banners_clicked int(5) NOT NULL DEFAULT '0', 100 | banners_history_date datetime NOT NULL, 101 | PRIMARY KEY (banners_history_id), 102 | KEY idx_banners_history_banners_id (banners_id) 103 | ); 104 | 105 | DROP TABLE IF EXISTS categories; 106 | CREATE TABLE categories ( 107 | categories_id int NOT NULL auto_increment, 108 | categories_image varchar(64), 109 | parent_id int DEFAULT '0' NOT NULL, 110 | sort_order int(3), 111 | date_added datetime, 112 | last_modified datetime, 113 | PRIMARY KEY (categories_id), 114 | KEY idx_categories_parent_id (parent_id) 115 | ); 116 | 117 | DROP TABLE IF EXISTS categories_description; 118 | CREATE TABLE categories_description ( 119 | categories_id int DEFAULT '0' NOT NULL, 120 | language_id int DEFAULT '1' NOT NULL, 121 | categories_name varchar(32) NOT NULL, 122 | PRIMARY KEY (categories_id, language_id), 123 | KEY idx_categories_name (categories_name) 124 | ); 125 | 126 | DROP TABLE IF EXISTS configuration; 127 | CREATE TABLE configuration ( 128 | configuration_id int NOT NULL auto_increment, 129 | configuration_title varchar(255) NOT NULL, 130 | configuration_key varchar(255) NOT NULL, 131 | configuration_value text NOT NULL, 132 | configuration_description varchar(255) NOT NULL, 133 | configuration_group_id int NOT NULL, 134 | sort_order int(5) NULL, 135 | last_modified datetime NULL, 136 | date_added datetime NOT NULL, 137 | use_function varchar(255) NULL, 138 | set_function varchar(255) NULL, 139 | PRIMARY KEY (configuration_id) 140 | ); 141 | 142 | DROP TABLE IF EXISTS configuration_group; 143 | CREATE TABLE configuration_group ( 144 | configuration_group_id int NOT NULL auto_increment, 145 | configuration_group_title varchar(64) NOT NULL, 146 | configuration_group_description varchar(255) NOT NULL, 147 | sort_order int(5) NULL, 148 | visible int(1) DEFAULT '1' NULL, 149 | PRIMARY KEY (configuration_group_id) 150 | ); 151 | 152 | DROP TABLE IF EXISTS counter; 153 | CREATE TABLE counter ( 154 | startdate char(8), 155 | counter int(12) 156 | ); 157 | 158 | DROP TABLE IF EXISTS counter_history; 159 | CREATE TABLE counter_history ( 160 | month char(8), 161 | counter int(12) 162 | ); 163 | 164 | DROP TABLE IF EXISTS countries; 165 | CREATE TABLE countries ( 166 | countries_id int NOT NULL auto_increment, 167 | countries_name varchar(255) NOT NULL, 168 | countries_iso_code_2 char(2) NOT NULL, 169 | countries_iso_code_3 char(3) NOT NULL, 170 | address_format_id int NOT NULL, 171 | PRIMARY KEY (countries_id), 172 | KEY IDX_COUNTRIES_NAME (countries_name) 173 | ); 174 | 175 | DROP TABLE IF EXISTS currencies; 176 | CREATE TABLE currencies ( 177 | currencies_id int NOT NULL auto_increment, 178 | title varchar(32) NOT NULL, 179 | code char(3) NOT NULL, 180 | symbol_left varchar(12), 181 | symbol_right varchar(12), 182 | decimal_point char(1), 183 | thousands_point char(1), 184 | decimal_places char(1), 185 | value float(13,8), 186 | last_updated datetime NULL, 187 | PRIMARY KEY (currencies_id), 188 | KEY idx_currencies_code (code) 189 | ); 190 | 191 | DROP TABLE IF EXISTS customers; 192 | CREATE TABLE customers ( 193 | customers_id int NOT NULL auto_increment, 194 | customers_gender char(1), 195 | customers_firstname varchar(255) NOT NULL, 196 | customers_lastname varchar(255) NOT NULL, 197 | customers_dob datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, 198 | customers_email_address varchar(255) NOT NULL, 199 | customers_default_address_id int, 200 | customers_telephone varchar(255) NOT NULL, 201 | customers_fax varchar(255), 202 | customers_password varchar(60) NOT NULL, 203 | customers_newsletter char(1), 204 | PRIMARY KEY (customers_id), 205 | KEY idx_customers_email_address (customers_email_address) 206 | ); 207 | 208 | DROP TABLE IF EXISTS customers_basket; 209 | CREATE TABLE customers_basket ( 210 | customers_basket_id int NOT NULL auto_increment, 211 | customers_id int NOT NULL, 212 | products_id tinytext NOT NULL, 213 | customers_basket_quantity int(2) NOT NULL, 214 | final_price decimal(15,4), 215 | customers_basket_date_added char(8), 216 | PRIMARY KEY (customers_basket_id), 217 | KEY idx_customers_basket_customers_id (customers_id) 218 | ); 219 | 220 | DROP TABLE IF EXISTS customers_basket_attributes; 221 | CREATE TABLE customers_basket_attributes ( 222 | customers_basket_attributes_id int NOT NULL auto_increment, 223 | customers_id int NOT NULL, 224 | products_id tinytext NOT NULL, 225 | products_options_id int NOT NULL, 226 | products_options_value_id int NOT NULL, 227 | PRIMARY KEY (customers_basket_attributes_id), 228 | KEY idx_customers_basket_att_customers_id (customers_id) 229 | ); 230 | 231 | DROP TABLE IF EXISTS customers_info; 232 | CREATE TABLE customers_info ( 233 | customers_info_id int NOT NULL, 234 | customers_info_date_of_last_logon datetime, 235 | customers_info_number_of_logons int(5), 236 | customers_info_date_account_created datetime, 237 | customers_info_date_account_last_modified datetime, 238 | global_product_notifications int(1) DEFAULT '0', 239 | password_reset_key char(40), 240 | password_reset_date datetime, 241 | PRIMARY KEY (customers_info_id) 242 | ); 243 | 244 | DROP TABLE IF EXISTS languages; 245 | CREATE TABLE languages ( 246 | languages_id int NOT NULL auto_increment, 247 | name varchar(32) NOT NULL, 248 | code char(2) NOT NULL, 249 | image varchar(64), 250 | directory varchar(32), 251 | sort_order int(3), 252 | PRIMARY KEY (languages_id), 253 | KEY IDX_LANGUAGES_NAME (name) 254 | ); 255 | 256 | 257 | DROP TABLE IF EXISTS manufacturers; 258 | CREATE TABLE manufacturers ( 259 | manufacturers_id int NOT NULL auto_increment, 260 | manufacturers_name varchar(32) NOT NULL, 261 | manufacturers_image varchar(64), 262 | date_added datetime NULL, 263 | last_modified datetime NULL, 264 | PRIMARY KEY (manufacturers_id), 265 | KEY IDX_MANUFACTURERS_NAME (manufacturers_name) 266 | ); 267 | 268 | DROP TABLE IF EXISTS manufacturers_info; 269 | CREATE TABLE manufacturers_info ( 270 | manufacturers_id int NOT NULL, 271 | languages_id int NOT NULL, 272 | manufacturers_url varchar(255) NOT NULL, 273 | url_clicked int(5) NOT NULL default '0', 274 | date_last_click datetime NULL, 275 | PRIMARY KEY (manufacturers_id, languages_id) 276 | ); 277 | 278 | DROP TABLE IF EXISTS newsletters; 279 | CREATE TABLE newsletters ( 280 | newsletters_id int NOT NULL auto_increment, 281 | title varchar(255) NOT NULL, 282 | content text NOT NULL, 283 | module varchar(255) NOT NULL, 284 | date_added datetime NOT NULL, 285 | date_sent datetime, 286 | status int(1), 287 | locked int(1) DEFAULT '0', 288 | PRIMARY KEY (newsletters_id) 289 | ); 290 | 291 | DROP TABLE IF EXISTS orders; 292 | CREATE TABLE orders ( 293 | orders_id int NOT NULL auto_increment, 294 | customers_id int NOT NULL, 295 | customers_name varchar(255) NOT NULL, 296 | customers_company varchar(255), 297 | customers_street_address varchar(255) NOT NULL, 298 | customers_suburb varchar(255), 299 | customers_city varchar(255) NOT NULL, 300 | customers_postcode varchar(255) NOT NULL, 301 | customers_state varchar(255), 302 | customers_country varchar(255) NOT NULL, 303 | customers_telephone varchar(255) NOT NULL, 304 | customers_email_address varchar(255) NOT NULL, 305 | customers_address_format_id int(5) NOT NULL, 306 | delivery_name varchar(255) NOT NULL, 307 | delivery_company varchar(255), 308 | delivery_street_address varchar(255) NOT NULL, 309 | delivery_suburb varchar(255), 310 | delivery_city varchar(255) NOT NULL, 311 | delivery_postcode varchar(255) NOT NULL, 312 | delivery_state varchar(255), 313 | delivery_country varchar(255) NOT NULL, 314 | delivery_address_format_id int(5) NOT NULL, 315 | billing_name varchar(255) NOT NULL, 316 | billing_company varchar(255), 317 | billing_street_address varchar(255) NOT NULL, 318 | billing_suburb varchar(255), 319 | billing_city varchar(255) NOT NULL, 320 | billing_postcode varchar(255) NOT NULL, 321 | billing_state varchar(255), 322 | billing_country varchar(255) NOT NULL, 323 | billing_address_format_id int(5) NOT NULL, 324 | payment_method varchar(255) NOT NULL, 325 | cc_type varchar(20), 326 | cc_owner varchar(255), 327 | cc_number varchar(32), 328 | cc_expires varchar(4), 329 | last_modified datetime, 330 | date_purchased datetime, 331 | orders_status int(5) NOT NULL, 332 | orders_date_finished datetime, 333 | currency char(3), 334 | currency_value decimal(14,6), 335 | PRIMARY KEY (orders_id), 336 | KEY idx_orders_customers_id (customers_id) 337 | ); 338 | 339 | DROP TABLE IF EXISTS orders_products; 340 | CREATE TABLE orders_products ( 341 | orders_products_id int NOT NULL auto_increment, 342 | orders_id int NOT NULL, 343 | products_id int NOT NULL, 344 | products_model varchar(12), 345 | products_name varchar(64) NOT NULL, 346 | products_price decimal(15,4) NOT NULL, 347 | final_price decimal(15,4) NOT NULL, 348 | products_tax decimal(7,4) NOT NULL, 349 | products_quantity int(2) NOT NULL, 350 | PRIMARY KEY (orders_products_id), 351 | KEY idx_orders_products_orders_id (orders_id), 352 | KEY idx_orders_products_products_id (products_id) 353 | ); 354 | 355 | DROP TABLE IF EXISTS orders_status; 356 | CREATE TABLE orders_status ( 357 | orders_status_id int DEFAULT '0' NOT NULL, 358 | language_id int DEFAULT '1' NOT NULL, 359 | orders_status_name varchar(32) NOT NULL, 360 | public_flag int DEFAULT '1', 361 | downloads_flag int DEFAULT '0', 362 | PRIMARY KEY (orders_status_id, language_id), 363 | KEY idx_orders_status_name (orders_status_name) 364 | ); 365 | 366 | DROP TABLE IF EXISTS orders_status_history; 367 | CREATE TABLE orders_status_history ( 368 | orders_status_history_id int NOT NULL auto_increment, 369 | orders_id int NOT NULL, 370 | orders_status_id int(5) NOT NULL, 371 | date_added datetime NOT NULL, 372 | customer_notified int(1) DEFAULT '0', 373 | comments text, 374 | PRIMARY KEY (orders_status_history_id), 375 | KEY idx_orders_status_history_orders_id (orders_id) 376 | ); 377 | 378 | DROP TABLE IF EXISTS orders_products_attributes; 379 | CREATE TABLE orders_products_attributes ( 380 | orders_products_attributes_id int NOT NULL auto_increment, 381 | orders_id int NOT NULL, 382 | orders_products_id int NOT NULL, 383 | products_options varchar(32) NOT NULL, 384 | products_options_values varchar(32) NOT NULL, 385 | options_values_price decimal(15,4) NOT NULL, 386 | price_prefix char(1) NOT NULL, 387 | PRIMARY KEY (orders_products_attributes_id), 388 | KEY idx_orders_products_att_orders_id (orders_id) 389 | ); 390 | 391 | DROP TABLE IF EXISTS orders_products_download; 392 | CREATE TABLE orders_products_download ( 393 | orders_products_download_id int NOT NULL auto_increment, 394 | orders_id int NOT NULL default '0', 395 | orders_products_id int NOT NULL default '0', 396 | orders_products_filename varchar(255) NOT NULL default '', 397 | download_maxdays int(2) NOT NULL default '0', 398 | download_count int(2) NOT NULL default '0', 399 | PRIMARY KEY (orders_products_download_id), 400 | KEY idx_orders_products_download_orders_id (orders_id) 401 | ); 402 | 403 | DROP TABLE IF EXISTS orders_total; 404 | CREATE TABLE orders_total ( 405 | orders_total_id int unsigned NOT NULL auto_increment, 406 | orders_id int NOT NULL, 407 | title varchar(255) NOT NULL, 408 | text varchar(255) NOT NULL, 409 | value decimal(15,4) NOT NULL, 410 | class varchar(32) NOT NULL, 411 | sort_order int NOT NULL, 412 | PRIMARY KEY (orders_total_id), 413 | KEY idx_orders_total_orders_id (orders_id) 414 | ); 415 | 416 | DROP TABLE IF EXISTS products; 417 | CREATE TABLE products ( 418 | products_id int NOT NULL auto_increment, 419 | products_quantity int(4) NOT NULL, 420 | products_model varchar(12), 421 | products_image varchar(64), 422 | products_price decimal(15,4) NOT NULL, 423 | products_date_added datetime NOT NULL, 424 | products_last_modified datetime, 425 | products_date_available datetime, 426 | products_weight decimal(5,2) NOT NULL, 427 | products_status tinyint(1) NOT NULL, 428 | products_tax_class_id int NOT NULL, 429 | manufacturers_id int NULL, 430 | products_ordered int NOT NULL default '0', 431 | PRIMARY KEY (products_id), 432 | KEY idx_products_model (products_model), 433 | KEY idx_products_date_added (products_date_added) 434 | ); 435 | 436 | DROP TABLE IF EXISTS products_attributes; 437 | CREATE TABLE products_attributes ( 438 | products_attributes_id int NOT NULL auto_increment, 439 | products_id int NOT NULL, 440 | options_id int NOT NULL, 441 | options_values_id int NOT NULL, 442 | options_values_price decimal(15,4) NOT NULL, 443 | price_prefix char(1) NOT NULL, 444 | PRIMARY KEY (products_attributes_id), 445 | KEY idx_products_attributes_products_id (products_id) 446 | ); 447 | 448 | DROP TABLE IF EXISTS products_attributes_download; 449 | CREATE TABLE products_attributes_download ( 450 | products_attributes_id int NOT NULL, 451 | products_attributes_filename varchar(255) NOT NULL default '', 452 | products_attributes_maxdays int(2) default '0', 453 | products_attributes_maxcount int(2) default '0', 454 | PRIMARY KEY (products_attributes_id) 455 | ); 456 | 457 | DROP TABLE IF EXISTS products_description; 458 | CREATE TABLE products_description ( 459 | products_id int NOT NULL auto_increment, 460 | language_id int NOT NULL default '1', 461 | products_name varchar(64) NOT NULL default '', 462 | products_description text, 463 | products_url varchar(255) default NULL, 464 | products_viewed int(5) default '0', 465 | PRIMARY KEY (products_id,language_id), 466 | KEY products_name (products_name) 467 | ); 468 | 469 | DROP TABLE IF EXISTS products_images; 470 | CREATE TABLE products_images ( 471 | id int NOT NULL auto_increment, 472 | products_id int NOT NULL, 473 | image varchar(64), 474 | htmlcontent text, 475 | sort_order int NOT NULL, 476 | PRIMARY KEY (id), 477 | KEY products_images_prodid (products_id) 478 | ); 479 | 480 | DROP TABLE IF EXISTS products_notifications; 481 | CREATE TABLE products_notifications ( 482 | products_id int NOT NULL, 483 | customers_id int NOT NULL, 484 | date_added datetime NOT NULL, 485 | PRIMARY KEY (products_id, customers_id) 486 | ); 487 | 488 | DROP TABLE IF EXISTS products_options; 489 | CREATE TABLE products_options ( 490 | products_options_id int NOT NULL default '0', 491 | language_id int NOT NULL default '1', 492 | products_options_name varchar(32) NOT NULL default '', 493 | PRIMARY KEY (products_options_id,language_id) 494 | ); 495 | 496 | DROP TABLE IF EXISTS products_options_values; 497 | CREATE TABLE products_options_values ( 498 | products_options_values_id int NOT NULL default '0', 499 | language_id int NOT NULL default '1', 500 | products_options_values_name varchar(64) NOT NULL default '', 501 | PRIMARY KEY (products_options_values_id,language_id) 502 | ); 503 | 504 | DROP TABLE IF EXISTS products_options_values_to_products_options; 505 | CREATE TABLE products_options_values_to_products_options ( 506 | products_options_values_to_products_options_id int NOT NULL auto_increment, 507 | products_options_id int NOT NULL, 508 | products_options_values_id int NOT NULL, 509 | PRIMARY KEY (products_options_values_to_products_options_id) 510 | ); 511 | 512 | DROP TABLE IF EXISTS products_to_categories; 513 | CREATE TABLE products_to_categories ( 514 | products_id int NOT NULL, 515 | categories_id int NOT NULL, 516 | PRIMARY KEY (products_id,categories_id) 517 | ); 518 | 519 | DROP TABLE IF EXISTS reviews; 520 | CREATE TABLE reviews ( 521 | reviews_id int NOT NULL auto_increment, 522 | products_id int NOT NULL, 523 | customers_id int, 524 | customers_name varchar(255) NOT NULL, 525 | reviews_rating int(1), 526 | date_added datetime, 527 | last_modified datetime, 528 | reviews_status tinyint(1) NOT NULL default '0', 529 | reviews_read int(5) NOT NULL default '0', 530 | PRIMARY KEY (reviews_id), 531 | KEY idx_reviews_products_id (products_id), 532 | KEY idx_reviews_customers_id (customers_id) 533 | ); 534 | 535 | DROP TABLE IF EXISTS reviews_description; 536 | CREATE TABLE reviews_description ( 537 | reviews_id int NOT NULL, 538 | languages_id int NOT NULL, 539 | reviews_text text NOT NULL, 540 | PRIMARY KEY (reviews_id, languages_id) 541 | ); 542 | 543 | DROP TABLE IF EXISTS sec_directory_whitelist; 544 | CREATE TABLE sec_directory_whitelist ( 545 | id int NOT NULL auto_increment, 546 | directory varchar(255) NOT NULL, 547 | PRIMARY KEY (id) 548 | ); 549 | 550 | DROP TABLE IF EXISTS sessions; 551 | CREATE TABLE sessions ( 552 | sesskey varchar(32) NOT NULL, 553 | expiry int(11) unsigned NOT NULL, 554 | value text NOT NULL, 555 | PRIMARY KEY (sesskey) 556 | ); 557 | 558 | DROP TABLE IF EXISTS specials; 559 | CREATE TABLE specials ( 560 | specials_id int NOT NULL auto_increment, 561 | products_id int NOT NULL, 562 | specials_new_products_price decimal(15,4) NOT NULL, 563 | specials_date_added datetime, 564 | specials_last_modified datetime, 565 | expires_date datetime, 566 | date_status_change datetime, 567 | status int(1) NOT NULL DEFAULT '1', 568 | PRIMARY KEY (specials_id), 569 | KEY idx_specials_products_id (products_id) 570 | ); 571 | 572 | DROP TABLE IF EXISTS tax_class; 573 | CREATE TABLE tax_class ( 574 | tax_class_id int NOT NULL auto_increment, 575 | tax_class_title varchar(32) NOT NULL, 576 | tax_class_description varchar(255) NOT NULL, 577 | last_modified datetime NULL, 578 | date_added datetime NOT NULL, 579 | PRIMARY KEY (tax_class_id) 580 | ); 581 | 582 | DROP TABLE IF EXISTS tax_rates; 583 | CREATE TABLE tax_rates ( 584 | tax_rates_id int NOT NULL auto_increment, 585 | tax_zone_id int NOT NULL, 586 | tax_class_id int NOT NULL, 587 | tax_priority int(5) DEFAULT 1, 588 | tax_rate decimal(7,4) NOT NULL, 589 | tax_description varchar(255) NOT NULL, 590 | last_modified datetime NULL, 591 | date_added datetime NOT NULL, 592 | PRIMARY KEY (tax_rates_id) 593 | ); 594 | 595 | DROP TABLE IF EXISTS geo_zones; 596 | CREATE TABLE geo_zones ( 597 | geo_zone_id int NOT NULL auto_increment, 598 | geo_zone_name varchar(32) NOT NULL, 599 | geo_zone_description varchar(255) NOT NULL, 600 | last_modified datetime NULL, 601 | date_added datetime NOT NULL, 602 | PRIMARY KEY (geo_zone_id) 603 | ); 604 | 605 | DROP TABLE IF EXISTS whos_online; 606 | CREATE TABLE whos_online ( 607 | customer_id int, 608 | full_name varchar(255) NOT NULL, 609 | session_id varchar(128) NOT NULL, 610 | ip_address varchar(15) NOT NULL, 611 | time_entry varchar(14) NOT NULL, 612 | time_last_click varchar(14) NOT NULL, 613 | last_page_url text NOT NULL 614 | ); 615 | 616 | DROP TABLE IF EXISTS zones; 617 | CREATE TABLE zones ( 618 | zone_id int NOT NULL auto_increment, 619 | zone_country_id int NOT NULL, 620 | zone_code varchar(32) NOT NULL, 621 | zone_name varchar(255) NOT NULL, 622 | PRIMARY KEY (zone_id), 623 | KEY idx_zones_country_id (zone_country_id) 624 | ); 625 | 626 | DROP TABLE IF EXISTS zones_to_geo_zones; 627 | CREATE TABLE zones_to_geo_zones ( 628 | association_id int NOT NULL auto_increment, 629 | zone_country_id int NOT NULL, 630 | zone_id int NULL, 631 | geo_zone_id int NULL, 632 | last_modified datetime NULL, 633 | date_added datetime NOT NULL, 634 | PRIMARY KEY (association_id), 635 | KEY idx_zones_to_geo_zones_country_id (zone_country_id) 636 | ); 637 | 638 | 639 | -------------------------------------------------------------------------------- /sakila.sql: -------------------------------------------------------------------------------- 1 | -- Sakila Sample Database Schema 2 | -- Version 0.8 3 | 4 | -- Copyright (c) 2006, MySQL AB 5 | -- All rights reserved. 6 | 7 | -- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 8 | 9 | -- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 10 | -- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 11 | -- * Neither the name of MySQL AB nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14 | 15 | 16 | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; 17 | SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; 18 | SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; 19 | 20 | DROP SCHEMA IF EXISTS sakila; 21 | CREATE SCHEMA sakila; 22 | USE sakila; 23 | 24 | -- 25 | -- Table structure for table `actor` 26 | -- 27 | 28 | CREATE TABLE actor ( 29 | actor_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 30 | first_name VARCHAR(45) NOT NULL, 31 | last_name VARCHAR(45) NOT NULL, 32 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 33 | PRIMARY KEY (actor_id), 34 | KEY idx_actor_last_name (last_name) 35 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 36 | 37 | -- 38 | -- Table structure for table `address` 39 | -- 40 | 41 | CREATE TABLE address ( 42 | address_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 43 | address VARCHAR(50) NOT NULL, 44 | address2 VARCHAR(50) DEFAULT NULL, 45 | district VARCHAR(20) NOT NULL, 46 | city_id SMALLINT UNSIGNED NOT NULL, 47 | postal_code VARCHAR(10) DEFAULT NULL, 48 | phone VARCHAR(20) NOT NULL, 49 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 50 | PRIMARY KEY (address_id), 51 | KEY idx_fk_city_id (city_id), 52 | CONSTRAINT `fk_address_city` FOREIGN KEY (city_id) REFERENCES city (city_id) ON DELETE RESTRICT ON UPDATE CASCADE 53 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 54 | 55 | -- 56 | -- Table structure for table `category` 57 | -- 58 | 59 | CREATE TABLE category ( 60 | category_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, 61 | name VARCHAR(25) NOT NULL, 62 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 63 | PRIMARY KEY (category_id) 64 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 65 | 66 | -- 67 | -- Table structure for table `city` 68 | -- 69 | 70 | CREATE TABLE city ( 71 | city_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 72 | city VARCHAR(50) NOT NULL, 73 | country_id SMALLINT UNSIGNED NOT NULL, 74 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 75 | PRIMARY KEY (city_id), 76 | KEY idx_fk_country_id (country_id), 77 | CONSTRAINT `fk_city_country` FOREIGN KEY (country_id) REFERENCES country (country_id) ON DELETE RESTRICT ON UPDATE CASCADE 78 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 79 | 80 | -- 81 | -- Table structure for table `country` 82 | -- 83 | 84 | CREATE TABLE country ( 85 | country_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 86 | country VARCHAR(50) NOT NULL, 87 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 88 | PRIMARY KEY (country_id) 89 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 90 | 91 | -- 92 | -- Table structure for table `customer` 93 | -- 94 | 95 | CREATE TABLE customer ( 96 | customer_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 97 | store_id TINYINT UNSIGNED NOT NULL, 98 | first_name VARCHAR(45) NOT NULL, 99 | last_name VARCHAR(45) NOT NULL, 100 | email VARCHAR(50) DEFAULT NULL, 101 | address_id SMALLINT UNSIGNED NOT NULL, 102 | active BOOLEAN NOT NULL DEFAULT TRUE, 103 | create_date DATETIME NOT NULL, 104 | last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 105 | PRIMARY KEY (customer_id), 106 | KEY idx_fk_store_id (store_id), 107 | KEY idx_fk_address_id (address_id), 108 | KEY idx_last_name (last_name), 109 | CONSTRAINT fk_customer_address FOREIGN KEY (address_id) REFERENCES address (address_id) ON DELETE RESTRICT ON UPDATE CASCADE, 110 | CONSTRAINT fk_customer_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE 111 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 112 | 113 | -- 114 | -- Table structure for table `film` 115 | -- 116 | 117 | CREATE TABLE film ( 118 | film_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 119 | title VARCHAR(255) NOT NULL, 120 | description TEXT DEFAULT NULL, 121 | release_year YEAR DEFAULT NULL, 122 | language_id TINYINT UNSIGNED NOT NULL, 123 | original_language_id TINYINT UNSIGNED DEFAULT NULL, 124 | rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3, 125 | rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99, 126 | length SMALLINT UNSIGNED DEFAULT NULL, 127 | replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99, 128 | rating ENUM('G','PG','PG-13','R','NC-17') DEFAULT 'G', 129 | special_features SET('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, 130 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 131 | PRIMARY KEY (film_id), 132 | KEY idx_title (title), 133 | KEY idx_fk_language_id (language_id), 134 | KEY idx_fk_original_language_id (original_language_id), 135 | CONSTRAINT fk_film_language FOREIGN KEY (language_id) REFERENCES language (language_id) ON DELETE RESTRICT ON UPDATE CASCADE, 136 | CONSTRAINT fk_film_language_original FOREIGN KEY (original_language_id) REFERENCES language (language_id) ON DELETE RESTRICT ON UPDATE CASCADE 137 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 138 | 139 | -- 140 | -- Table structure for table `film_actor` 141 | -- 142 | 143 | CREATE TABLE film_actor ( 144 | actor_id SMALLINT UNSIGNED NOT NULL, 145 | film_id SMALLINT UNSIGNED NOT NULL, 146 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 147 | PRIMARY KEY (actor_id,film_id), 148 | KEY idx_fk_film_id (`film_id`), 149 | CONSTRAINT fk_film_actor_actor FOREIGN KEY (actor_id) REFERENCES actor (actor_id) ON DELETE RESTRICT ON UPDATE CASCADE, 150 | CONSTRAINT fk_film_actor_film FOREIGN KEY (film_id) REFERENCES film (film_id) ON DELETE RESTRICT ON UPDATE CASCADE 151 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 152 | 153 | -- 154 | -- Table structure for table `film_category` 155 | -- 156 | 157 | CREATE TABLE film_category ( 158 | film_id SMALLINT UNSIGNED NOT NULL, 159 | category_id TINYINT UNSIGNED NOT NULL, 160 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 161 | PRIMARY KEY (film_id, category_id), 162 | CONSTRAINT fk_film_category_film FOREIGN KEY (film_id) REFERENCES film (film_id) ON DELETE RESTRICT ON UPDATE CASCADE, 163 | CONSTRAINT fk_film_category_category FOREIGN KEY (category_id) REFERENCES category (category_id) ON DELETE RESTRICT ON UPDATE CASCADE 164 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 165 | 166 | -- 167 | -- Table structure for table `film_text` 168 | -- 169 | 170 | CREATE TABLE film_text ( 171 | film_id SMALLINT NOT NULL, 172 | title VARCHAR(255) NOT NULL, 173 | description TEXT, 174 | PRIMARY KEY (film_id), 175 | FULLTEXT KEY idx_title_description (title,description) 176 | )ENGINE=MyISAM DEFAULT CHARSET=utf8; 177 | 178 | -- 179 | -- Triggers for loading film_text from film 180 | -- 181 | 182 | DELIMITER ;; 183 | CREATE TRIGGER `ins_film` AFTER INSERT ON `film` FOR EACH ROW BEGIN 184 | INSERT INTO film_text (film_id, title, description) 185 | VALUES (new.film_id, new.title, new.description); 186 | END;; 187 | 188 | 189 | CREATE TRIGGER `upd_film` AFTER UPDATE ON `film` FOR EACH ROW BEGIN 190 | IF (old.title != new.title) OR (old.description != new.description) OR (old.film_id != new.film_id) 191 | THEN 192 | UPDATE film_text 193 | SET title=new.title, 194 | description=new.description, 195 | film_id=new.film_id 196 | WHERE film_id=old.film_id; 197 | END IF; 198 | END;; 199 | 200 | 201 | CREATE TRIGGER `del_film` AFTER DELETE ON `film` FOR EACH ROW BEGIN 202 | DELETE FROM film_text WHERE film_id = old.film_id; 203 | END;; 204 | 205 | DELIMITER ; 206 | 207 | -- 208 | -- Table structure for table `inventory` 209 | -- 210 | 211 | CREATE TABLE inventory ( 212 | inventory_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, 213 | film_id SMALLINT UNSIGNED NOT NULL, 214 | store_id TINYINT UNSIGNED NOT NULL, 215 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 216 | PRIMARY KEY (inventory_id), 217 | KEY idx_fk_film_id (film_id), 218 | KEY idx_store_id_film_id (store_id,film_id), 219 | CONSTRAINT fk_inventory_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE, 220 | CONSTRAINT fk_inventory_film FOREIGN KEY (film_id) REFERENCES film (film_id) ON DELETE RESTRICT ON UPDATE CASCADE 221 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 222 | 223 | -- 224 | -- Table structure for table `language` 225 | -- 226 | 227 | CREATE TABLE language ( 228 | language_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, 229 | name CHAR(20) NOT NULL, 230 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 231 | PRIMARY KEY (language_id) 232 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 233 | 234 | -- 235 | -- Table structure for table `payment` 236 | -- 237 | 238 | CREATE TABLE payment ( 239 | payment_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, 240 | customer_id SMALLINT UNSIGNED NOT NULL, 241 | staff_id TINYINT UNSIGNED NOT NULL, 242 | rental_id INT DEFAULT NULL, 243 | amount DECIMAL(5,2) NOT NULL, 244 | payment_date DATETIME NOT NULL, 245 | last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 246 | PRIMARY KEY (payment_id), 247 | KEY idx_fk_staff_id (staff_id), 248 | KEY idx_fk_customer_id (customer_id), 249 | CONSTRAINT fk_payment_rental FOREIGN KEY (rental_id) REFERENCES rental (rental_id) ON DELETE SET NULL ON UPDATE CASCADE, 250 | CONSTRAINT fk_payment_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id) ON DELETE RESTRICT ON UPDATE CASCADE, 251 | CONSTRAINT fk_payment_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE 252 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 253 | 254 | 255 | -- 256 | -- Table structure for table `rental` 257 | -- 258 | 259 | CREATE TABLE rental ( 260 | rental_id INT NOT NULL AUTO_INCREMENT, 261 | rental_date DATETIME NOT NULL, 262 | inventory_id MEDIUMINT UNSIGNED NOT NULL, 263 | customer_id SMALLINT UNSIGNED NOT NULL, 264 | return_date DATETIME DEFAULT NULL, 265 | staff_id TINYINT UNSIGNED NOT NULL, 266 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 267 | PRIMARY KEY (rental_id), 268 | UNIQUE KEY (rental_date,inventory_id,customer_id), 269 | KEY idx_fk_inventory_id (inventory_id), 270 | KEY idx_fk_customer_id (customer_id), 271 | KEY idx_fk_staff_id (staff_id), 272 | CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE, 273 | CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ON DELETE RESTRICT ON UPDATE CASCADE, 274 | CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id) ON DELETE RESTRICT ON UPDATE CASCADE 275 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 276 | 277 | -- 278 | -- Table structure for table `staff` 279 | -- 280 | 281 | CREATE TABLE staff ( 282 | staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, 283 | first_name VARCHAR(45) NOT NULL, 284 | last_name VARCHAR(45) NOT NULL, 285 | address_id SMALLINT UNSIGNED NOT NULL, 286 | picture BLOB DEFAULT NULL, 287 | email VARCHAR(50) DEFAULT NULL, 288 | store_id TINYINT UNSIGNED NOT NULL, 289 | active BOOLEAN NOT NULL DEFAULT TRUE, 290 | username VARCHAR(16) NOT NULL, 291 | password VARCHAR(40) BINARY DEFAULT NULL, 292 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 293 | PRIMARY KEY (staff_id), 294 | KEY idx_fk_store_id (store_id), 295 | KEY idx_fk_address_id (address_id), 296 | CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE, 297 | CONSTRAINT fk_staff_address FOREIGN KEY (address_id) REFERENCES address (address_id) ON DELETE RESTRICT ON UPDATE CASCADE 298 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 299 | 300 | -- 301 | -- Table structure for table `store` 302 | -- 303 | 304 | CREATE TABLE store ( 305 | store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, 306 | manager_staff_id TINYINT UNSIGNED NOT NULL, 307 | address_id SMALLINT UNSIGNED NOT NULL, 308 | last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 309 | PRIMARY KEY (store_id), 310 | UNIQUE KEY idx_unique_manager (manager_staff_id), 311 | KEY idx_fk_address_id (address_id), 312 | CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE, 313 | CONSTRAINT fk_store_address FOREIGN KEY (address_id) REFERENCES address (address_id) ON DELETE RESTRICT ON UPDATE CASCADE 314 | )ENGINE=InnoDB DEFAULT CHARSET=utf8; 315 | 316 | -- 317 | -- View structure for view `customer_list` 318 | -- 319 | 320 | CREATE VIEW customer_list 321 | AS 322 | SELECT cu.customer_id AS ID, CONCAT(cu.first_name, _utf8' ', cu.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, 323 | a.phone AS phone, city.city AS city, country.country AS country, IF(cu.active, _utf8'active',_utf8'') AS notes, cu.store_id AS SID 324 | FROM customer AS cu JOIN address AS a ON cu.address_id = a.address_id JOIN city ON a.city_id = city.city_id 325 | JOIN country ON city.country_id = country.country_id; 326 | 327 | -- 328 | -- View structure for view `film_list` 329 | -- 330 | 331 | CREATE VIEW film_list 332 | AS 333 | SELECT film.film_id AS FID, film.title AS title, film.description AS description, category.name AS category, film.rental_rate AS price, 334 | film.length AS length, film.rating AS rating, GROUP_CONCAT(CONCAT(actor.first_name, _utf8' ', actor.last_name) SEPARATOR ', ') AS actors 335 | FROM category LEFT JOIN film_category ON category.category_id = film_category.category_id LEFT JOIN film ON film_category.film_id = film.film_id 336 | JOIN film_actor ON film.film_id = film_actor.film_id 337 | JOIN actor ON film_actor.actor_id = actor.actor_id 338 | GROUP BY film.film_id; 339 | 340 | -- 341 | -- View structure for view `nicer_but_slower_film_list` 342 | -- 343 | 344 | CREATE VIEW nicer_but_slower_film_list 345 | AS 346 | SELECT film.film_id AS FID, film.title AS title, film.description AS description, category.name AS category, film.rental_rate AS price, 347 | film.length AS length, film.rating AS rating, GROUP_CONCAT(CONCAT(CONCAT(UCASE(SUBSTR(actor.first_name,1,1)), 348 | LCASE(SUBSTR(actor.first_name,2,LENGTH(actor.first_name))),_utf8' ',CONCAT(UCASE(SUBSTR(actor.last_name,1,1)), 349 | LCASE(SUBSTR(actor.last_name,2,LENGTH(actor.last_name)))))) SEPARATOR ', ') AS actors 350 | FROM category LEFT JOIN film_category ON category.category_id = film_category.category_id LEFT JOIN film ON film_category.film_id = film.film_id 351 | JOIN film_actor ON film.film_id = film_actor.film_id 352 | JOIN actor ON film_actor.actor_id = actor.actor_id 353 | GROUP BY film.film_id; 354 | 355 | -- 356 | -- View structure for view `staff_list` 357 | -- 358 | 359 | CREATE VIEW staff_list 360 | AS 361 | SELECT s.staff_id AS ID, CONCAT(s.first_name, _utf8' ', s.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, a.phone AS phone, 362 | city.city AS city, country.country AS country, s.store_id AS SID 363 | FROM staff AS s JOIN address AS a ON s.address_id = a.address_id JOIN city ON a.city_id = city.city_id 364 | JOIN country ON city.country_id = country.country_id; 365 | 366 | -- 367 | -- View structure for view `sales_by_store` 368 | -- 369 | 370 | CREATE VIEW sales_by_store 371 | AS 372 | SELECT 373 | CONCAT(c.city, _utf8',', cy.country) AS store 374 | , CONCAT(m.first_name, _utf8' ', m.last_name) AS manager 375 | , SUM(p.amount) AS total_sales 376 | FROM payment AS p 377 | INNER JOIN rental AS r ON p.rental_id = r.rental_id 378 | INNER JOIN inventory AS i ON r.inventory_id = i.inventory_id 379 | INNER JOIN store AS s ON i.store_id = s.store_id 380 | INNER JOIN address AS a ON s.address_id = a.address_id 381 | INNER JOIN city AS c ON a.city_id = c.city_id 382 | INNER JOIN country AS cy ON c.country_id = cy.country_id 383 | INNER JOIN staff AS m ON s.manager_staff_id = m.staff_id 384 | GROUP BY s.store_id 385 | ORDER BY cy.country, c.city; 386 | 387 | -- 388 | -- View structure for view `sales_by_film_category` 389 | -- 390 | -- Note that total sales will add up to >100% because 391 | -- some titles belong to more than 1 category 392 | -- 393 | 394 | CREATE VIEW sales_by_film_category 395 | AS 396 | SELECT 397 | c.name AS category 398 | , SUM(p.amount) AS total_sales 399 | FROM payment AS p 400 | INNER JOIN rental AS r ON p.rental_id = r.rental_id 401 | INNER JOIN inventory AS i ON r.inventory_id = i.inventory_id 402 | INNER JOIN film AS f ON i.film_id = f.film_id 403 | INNER JOIN film_category AS fc ON f.film_id = fc.film_id 404 | INNER JOIN category AS c ON fc.category_id = c.category_id 405 | GROUP BY c.name 406 | ORDER BY total_sales DESC; 407 | 408 | -- 409 | -- View structure for view `actor_info` 410 | -- 411 | 412 | CREATE DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW actor_info 413 | AS 414 | SELECT 415 | a.actor_id, 416 | a.first_name, 417 | a.last_name, 418 | GROUP_CONCAT(DISTINCT CONCAT(c.name, ': ', 419 | (SELECT GROUP_CONCAT(f.title ORDER BY f.title SEPARATOR ', ') 420 | FROM sakila.film f 421 | INNER JOIN sakila.film_category fc 422 | ON f.film_id = fc.film_id 423 | INNER JOIN sakila.film_actor fa 424 | ON f.film_id = fa.film_id 425 | WHERE fc.category_id = c.category_id 426 | AND fa.actor_id = a.actor_id 427 | ) 428 | ) 429 | ORDER BY c.name SEPARATOR '; ') 430 | AS film_info 431 | FROM sakila.actor a 432 | LEFT JOIN sakila.film_actor fa 433 | ON a.actor_id = fa.actor_id 434 | LEFT JOIN sakila.film_category fc 435 | ON fa.film_id = fc.film_id 436 | LEFT JOIN sakila.category c 437 | ON fc.category_id = c.category_id 438 | GROUP BY a.actor_id, a.first_name, a.last_name; 439 | 440 | -- 441 | -- Procedure structure for procedure `rewards_report` 442 | -- 443 | 444 | DELIMITER // 445 | 446 | CREATE PROCEDURE rewards_report ( 447 | IN min_monthly_purchases TINYINT UNSIGNED 448 | , IN min_dollar_amount_purchased DECIMAL(10,2) UNSIGNED 449 | , OUT count_rewardees INT 450 | ) 451 | LANGUAGE SQL 452 | NOT DETERMINISTIC 453 | READS SQL DATA 454 | SQL SECURITY DEFINER 455 | COMMENT 'Provides a customizable report on best customers' 456 | proc: BEGIN 457 | 458 | DECLARE last_month_start DATE; 459 | DECLARE last_month_end DATE; 460 | 461 | /* Some sanity checks... */ 462 | IF min_monthly_purchases = 0 THEN 463 | SELECT 'Minimum monthly purchases parameter must be > 0'; 464 | LEAVE proc; 465 | END IF; 466 | IF min_dollar_amount_purchased = 0.00 THEN 467 | SELECT 'Minimum monthly dollar amount purchased parameter must be > $0.00'; 468 | LEAVE proc; 469 | END IF; 470 | 471 | /* Determine start and end time periods */ 472 | SET last_month_start = DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH); 473 | SET last_month_start = STR_TO_DATE(CONCAT(YEAR(last_month_start),'-',MONTH(last_month_start),'-01'),'%Y-%m-%d'); 474 | SET last_month_end = LAST_DAY(last_month_start); 475 | 476 | /* 477 | Create a temporary storage area for 478 | Customer IDs. 479 | */ 480 | CREATE TEMPORARY TABLE tmpCustomer (customer_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY); 481 | 482 | /* 483 | Find all customers meeting the 484 | monthly purchase requirements 485 | */ 486 | INSERT INTO tmpCustomer (customer_id) 487 | SELECT p.customer_id 488 | FROM payment AS p 489 | WHERE DATE(p.payment_date) BETWEEN last_month_start AND last_month_end 490 | GROUP BY customer_id 491 | HAVING SUM(p.amount) > min_dollar_amount_purchased 492 | AND COUNT(customer_id) > min_monthly_purchases; 493 | 494 | /* Populate OUT parameter with count of found customers */ 495 | SELECT COUNT(*) FROM tmpCustomer INTO count_rewardees; 496 | 497 | /* 498 | Output ALL customer information of matching rewardees. 499 | Customize output as needed. 500 | */ 501 | SELECT c.* 502 | FROM tmpCustomer AS t 503 | INNER JOIN customer AS c ON t.customer_id = c.customer_id; 504 | 505 | /* Clean up */ 506 | DROP TABLE tmpCustomer; 507 | END // 508 | 509 | DELIMITER ; 510 | 511 | DELIMITER $$ 512 | 513 | CREATE FUNCTION get_customer_balance(p_customer_id INT, p_effective_date DATETIME) RETURNS DECIMAL(5,2) 514 | DETERMINISTIC 515 | READS SQL DATA 516 | BEGIN 517 | 518 | #OK, WE NEED TO CALCULATE THE CURRENT BALANCE GIVEN A CUSTOMER_ID AND A DATE 519 | #THAT WE WANT THE BALANCE TO BE EFFECTIVE FOR. THE BALANCE IS: 520 | # 1) RENTAL FEES FOR ALL PREVIOUS RENTALS 521 | # 2) ONE DOLLAR FOR EVERY DAY THE PREVIOUS RENTALS ARE OVERDUE 522 | # 3) IF A FILM IS MORE THAN RENTAL_DURATION * 2 OVERDUE, CHARGE THE REPLACEMENT_COST 523 | # 4) SUBTRACT ALL PAYMENTS MADE BEFORE THE DATE SPECIFIED 524 | 525 | DECLARE v_rentfees DECIMAL(5,2); #FEES PAID TO RENT THE VIDEOS INITIALLY 526 | DECLARE v_overfees INTEGER; #LATE FEES FOR PRIOR RENTALS 527 | DECLARE v_payments DECIMAL(5,2); #SUM OF PAYMENTS MADE PREVIOUSLY 528 | 529 | SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees 530 | FROM film, inventory, rental 531 | WHERE film.film_id = inventory.film_id 532 | AND inventory.inventory_id = rental.inventory_id 533 | AND rental.rental_date <= p_effective_date 534 | AND rental.customer_id = p_customer_id; 535 | 536 | SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration, 537 | ((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees 538 | FROM rental, inventory, film 539 | WHERE film.film_id = inventory.film_id 540 | AND inventory.inventory_id = rental.inventory_id 541 | AND rental.rental_date <= p_effective_date 542 | AND rental.customer_id = p_customer_id; 543 | 544 | 545 | SELECT IFNULL(SUM(payment.amount),0) INTO v_payments 546 | FROM payment 547 | 548 | WHERE payment.payment_date <= p_effective_date 549 | AND payment.customer_id = p_customer_id; 550 | 551 | RETURN v_rentfees + v_overfees - v_payments; 552 | END $$ 553 | 554 | DELIMITER ; 555 | 556 | DELIMITER $$ 557 | 558 | CREATE PROCEDURE film_in_stock(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) 559 | READS SQL DATA 560 | BEGIN 561 | SELECT inventory_id 562 | FROM inventory 563 | WHERE film_id = p_film_id 564 | AND store_id = p_store_id 565 | AND inventory_in_stock(inventory_id); 566 | 567 | SELECT FOUND_ROWS() INTO p_film_count; 568 | END $$ 569 | 570 | DELIMITER ; 571 | 572 | DELIMITER $$ 573 | 574 | CREATE PROCEDURE film_not_in_stock(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) 575 | READS SQL DATA 576 | BEGIN 577 | SELECT inventory_id 578 | FROM inventory 579 | WHERE film_id = p_film_id 580 | AND store_id = p_store_id 581 | AND NOT inventory_in_stock(inventory_id); 582 | 583 | SELECT FOUND_ROWS() INTO p_film_count; 584 | END $$ 585 | 586 | DELIMITER ; 587 | 588 | DELIMITER $$ 589 | 590 | CREATE FUNCTION inventory_held_by_customer(p_inventory_id INT) RETURNS INT 591 | READS SQL DATA 592 | BEGIN 593 | DECLARE v_customer_id INT; 594 | DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL; 595 | 596 | SELECT customer_id INTO v_customer_id 597 | FROM rental 598 | WHERE return_date IS NULL 599 | AND inventory_id = p_inventory_id; 600 | 601 | RETURN v_customer_id; 602 | END $$ 603 | 604 | DELIMITER ; 605 | 606 | DELIMITER $$ 607 | 608 | CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN 609 | READS SQL DATA 610 | BEGIN 611 | DECLARE v_rentals INT; 612 | DECLARE v_out INT; 613 | 614 | #AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE 615 | #FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED 616 | 617 | SELECT COUNT(*) INTO v_rentals 618 | FROM rental 619 | WHERE inventory_id = p_inventory_id; 620 | 621 | IF v_rentals = 0 THEN 622 | RETURN TRUE; 623 | END IF; 624 | 625 | SELECT COUNT(rental_id) INTO v_out 626 | FROM inventory LEFT JOIN rental USING(inventory_id) 627 | WHERE inventory.inventory_id = p_inventory_id 628 | AND rental.return_date IS NULL; 629 | 630 | IF v_out > 0 THEN 631 | RETURN FALSE; 632 | ELSE 633 | RETURN TRUE; 634 | END IF; 635 | END $$ 636 | 637 | DELIMITER ; 638 | 639 | SET SQL_MODE=@OLD_SQL_MODE; 640 | SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; 641 | SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; 642 | 643 | 644 | -------------------------------------------------------------------------------- /mediawiki.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.1.47, for unknown-linux-gnu (x86_64) 2 | -- 3 | -- Host: localhost Database: mediawiki 4 | -- ------------------------------------------------------ 5 | -- Server version 5.5.8-log 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Current Database: `mediawiki` 20 | -- 21 | 22 | CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mediawiki` /*!40100 DEFAULT CHARACTER SET latin1 */; 23 | 24 | USE `mediawiki`; 25 | 26 | -- 27 | -- Table structure for table `archive` 28 | -- 29 | 30 | DROP TABLE IF EXISTS `archive`; 31 | /*!40101 SET @saved_cs_client = @@character_set_client */; 32 | /*!40101 SET character_set_client = utf8 */; 33 | CREATE TABLE `archive` ( 34 | `ar_namespace` int(11) NOT NULL DEFAULT '0', 35 | `ar_title` varbinary(255) NOT NULL DEFAULT '', 36 | `ar_text` mediumblob NOT NULL, 37 | `ar_comment` tinyblob NOT NULL, 38 | `ar_user` int(10) unsigned NOT NULL DEFAULT '0', 39 | `ar_user_text` varbinary(255) NOT NULL, 40 | `ar_timestamp` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 41 | `ar_minor_edit` tinyint(4) NOT NULL DEFAULT '0', 42 | `ar_flags` tinyblob NOT NULL, 43 | `ar_rev_id` int(10) unsigned DEFAULT NULL, 44 | `ar_text_id` int(10) unsigned DEFAULT NULL, 45 | `ar_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0', 46 | `ar_len` int(10) unsigned DEFAULT NULL, 47 | `ar_page_id` int(10) unsigned DEFAULT NULL, 48 | `ar_parent_id` int(10) unsigned DEFAULT NULL, 49 | KEY `name_title_timestamp` (`ar_namespace`,`ar_title`,`ar_timestamp`), 50 | KEY `usertext_timestamp` (`ar_user_text`,`ar_timestamp`) 51 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 52 | /*!40101 SET character_set_client = @saved_cs_client */; 53 | 54 | -- 55 | -- Table structure for table `category` 56 | -- 57 | 58 | DROP TABLE IF EXISTS `category`; 59 | /*!40101 SET @saved_cs_client = @@character_set_client */; 60 | /*!40101 SET character_set_client = utf8 */; 61 | CREATE TABLE `category` ( 62 | `cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 63 | `cat_title` varbinary(255) NOT NULL, 64 | `cat_pages` int(11) NOT NULL DEFAULT '0', 65 | `cat_subcats` int(11) NOT NULL DEFAULT '0', 66 | `cat_files` int(11) NOT NULL DEFAULT '0', 67 | `cat_hidden` tinyint(3) unsigned NOT NULL DEFAULT '0', 68 | PRIMARY KEY (`cat_id`), 69 | UNIQUE KEY `cat_title` (`cat_title`), 70 | KEY `cat_pages` (`cat_pages`) 71 | ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=binary; 72 | /*!40101 SET character_set_client = @saved_cs_client */; 73 | 74 | -- 75 | -- Table structure for table `categorylinks` 76 | -- 77 | 78 | DROP TABLE IF EXISTS `categorylinks`; 79 | /*!40101 SET @saved_cs_client = @@character_set_client */; 80 | /*!40101 SET character_set_client = utf8 */; 81 | CREATE TABLE `categorylinks` ( 82 | `cl_from` int(10) unsigned NOT NULL DEFAULT '0', 83 | `cl_to` varbinary(255) NOT NULL DEFAULT '', 84 | `cl_sortkey` varbinary(70) NOT NULL DEFAULT '', 85 | `cl_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 86 | UNIQUE KEY `cl_from` (`cl_from`,`cl_to`), 87 | KEY `cl_sortkey` (`cl_to`,`cl_sortkey`,`cl_from`), 88 | KEY `cl_timestamp` (`cl_to`,`cl_timestamp`) 89 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 90 | /*!40101 SET character_set_client = @saved_cs_client */; 91 | 92 | -- 93 | -- Table structure for table `change_tag` 94 | -- 95 | 96 | DROP TABLE IF EXISTS `change_tag`; 97 | /*!40101 SET @saved_cs_client = @@character_set_client */; 98 | /*!40101 SET character_set_client = utf8 */; 99 | CREATE TABLE `change_tag` ( 100 | `ct_rc_id` int(11) DEFAULT NULL, 101 | `ct_log_id` int(11) DEFAULT NULL, 102 | `ct_rev_id` int(11) DEFAULT NULL, 103 | `ct_tag` varbinary(255) NOT NULL, 104 | `ct_params` blob, 105 | UNIQUE KEY `change_tag_rc_tag` (`ct_rc_id`,`ct_tag`), 106 | UNIQUE KEY `change_tag_log_tag` (`ct_log_id`,`ct_tag`), 107 | UNIQUE KEY `change_tag_rev_tag` (`ct_rev_id`,`ct_tag`), 108 | KEY `change_tag_tag_id` (`ct_tag`,`ct_rc_id`,`ct_rev_id`,`ct_log_id`) 109 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 110 | /*!40101 SET character_set_client = @saved_cs_client */; 111 | 112 | -- 113 | -- Table structure for table `externallinks` 114 | -- 115 | 116 | DROP TABLE IF EXISTS `externallinks`; 117 | /*!40101 SET @saved_cs_client = @@character_set_client */; 118 | /*!40101 SET character_set_client = utf8 */; 119 | CREATE TABLE `externallinks` ( 120 | `el_from` int(10) unsigned NOT NULL DEFAULT '0', 121 | `el_to` blob NOT NULL, 122 | `el_index` blob NOT NULL, 123 | KEY `el_from` (`el_from`,`el_to`(40)), 124 | KEY `el_to` (`el_to`(60),`el_from`), 125 | KEY `el_index` (`el_index`(60)) 126 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 127 | /*!40101 SET character_set_client = @saved_cs_client */; 128 | 129 | -- 130 | -- Table structure for table `filearchive` 131 | -- 132 | 133 | DROP TABLE IF EXISTS `filearchive`; 134 | /*!40101 SET @saved_cs_client = @@character_set_client */; 135 | /*!40101 SET character_set_client = utf8 */; 136 | CREATE TABLE `filearchive` ( 137 | `fa_id` int(11) NOT NULL AUTO_INCREMENT, 138 | `fa_name` varbinary(255) NOT NULL DEFAULT '', 139 | `fa_archive_name` varbinary(255) DEFAULT '', 140 | `fa_storage_group` varbinary(16) DEFAULT NULL, 141 | `fa_storage_key` varbinary(64) DEFAULT '', 142 | `fa_deleted_user` int(11) DEFAULT NULL, 143 | `fa_deleted_timestamp` binary(14) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 144 | `fa_deleted_reason` blob, 145 | `fa_size` int(10) unsigned DEFAULT '0', 146 | `fa_width` int(11) DEFAULT '0', 147 | `fa_height` int(11) DEFAULT '0', 148 | `fa_metadata` mediumblob, 149 | `fa_bits` int(11) DEFAULT '0', 150 | `fa_media_type` enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') DEFAULT NULL, 151 | `fa_major_mime` enum('unknown','application','audio','image','text','video','message','model','multipart') DEFAULT 'unknown', 152 | `fa_minor_mime` varbinary(32) DEFAULT 'unknown', 153 | `fa_description` tinyblob, 154 | `fa_user` int(10) unsigned DEFAULT '0', 155 | `fa_user_text` varbinary(255) DEFAULT NULL, 156 | `fa_timestamp` binary(14) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 157 | `fa_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0', 158 | PRIMARY KEY (`fa_id`), 159 | KEY `fa_name` (`fa_name`,`fa_timestamp`), 160 | KEY `fa_storage_group` (`fa_storage_group`,`fa_storage_key`), 161 | KEY `fa_deleted_timestamp` (`fa_deleted_timestamp`), 162 | KEY `fa_user_timestamp` (`fa_user_text`,`fa_timestamp`) 163 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 164 | /*!40101 SET character_set_client = @saved_cs_client */; 165 | 166 | -- 167 | -- Table structure for table `hitcounter` 168 | -- 169 | 170 | DROP TABLE IF EXISTS `hitcounter`; 171 | /*!40101 SET @saved_cs_client = @@character_set_client */; 172 | /*!40101 SET character_set_client = utf8 */; 173 | CREATE TABLE `hitcounter` ( 174 | `hc_id` int(10) unsigned NOT NULL 175 | ) ENGINE=MEMORY DEFAULT CHARSET=latin1 MAX_ROWS=25000; 176 | /*!40101 SET character_set_client = @saved_cs_client */; 177 | 178 | -- 179 | -- Table structure for table `image` 180 | -- 181 | 182 | DROP TABLE IF EXISTS `image`; 183 | /*!40101 SET @saved_cs_client = @@character_set_client */; 184 | /*!40101 SET character_set_client = utf8 */; 185 | CREATE TABLE `image` ( 186 | `img_name` varbinary(255) NOT NULL DEFAULT '', 187 | `img_size` int(10) unsigned NOT NULL DEFAULT '0', 188 | `img_width` int(11) NOT NULL DEFAULT '0', 189 | `img_height` int(11) NOT NULL DEFAULT '0', 190 | `img_metadata` mediumblob NOT NULL, 191 | `img_bits` int(11) NOT NULL DEFAULT '0', 192 | `img_media_type` enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') DEFAULT NULL, 193 | `img_major_mime` enum('unknown','application','audio','image','text','video','message','model','multipart') NOT NULL DEFAULT 'unknown', 194 | `img_minor_mime` varbinary(32) NOT NULL DEFAULT 'unknown', 195 | `img_description` tinyblob NOT NULL, 196 | `img_user` int(10) unsigned NOT NULL DEFAULT '0', 197 | `img_user_text` varbinary(255) NOT NULL, 198 | `img_timestamp` varbinary(14) NOT NULL DEFAULT '', 199 | `img_sha1` varbinary(32) NOT NULL DEFAULT '', 200 | PRIMARY KEY (`img_name`), 201 | KEY `img_usertext_timestamp` (`img_user_text`,`img_timestamp`), 202 | KEY `img_size` (`img_size`), 203 | KEY `img_timestamp` (`img_timestamp`), 204 | KEY `img_sha1` (`img_sha1`) 205 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 206 | /*!40101 SET character_set_client = @saved_cs_client */; 207 | 208 | -- 209 | -- Table structure for table `imagelinks` 210 | -- 211 | 212 | DROP TABLE IF EXISTS `imagelinks`; 213 | /*!40101 SET @saved_cs_client = @@character_set_client */; 214 | /*!40101 SET character_set_client = utf8 */; 215 | CREATE TABLE `imagelinks` ( 216 | `il_from` int(10) unsigned NOT NULL DEFAULT '0', 217 | `il_to` varbinary(255) NOT NULL DEFAULT '', 218 | UNIQUE KEY `il_from` (`il_from`,`il_to`), 219 | UNIQUE KEY `il_to` (`il_to`,`il_from`) 220 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 221 | /*!40101 SET character_set_client = @saved_cs_client */; 222 | 223 | -- 224 | -- Table structure for table `interwiki` 225 | -- 226 | 227 | DROP TABLE IF EXISTS `interwiki`; 228 | /*!40101 SET @saved_cs_client = @@character_set_client */; 229 | /*!40101 SET character_set_client = utf8 */; 230 | CREATE TABLE `interwiki` ( 231 | `iw_prefix` varbinary(32) NOT NULL, 232 | `iw_url` blob NOT NULL, 233 | `iw_local` tinyint(1) NOT NULL, 234 | `iw_trans` tinyint(4) NOT NULL DEFAULT '0', 235 | UNIQUE KEY `iw_prefix` (`iw_prefix`) 236 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 237 | /*!40101 SET character_set_client = @saved_cs_client */; 238 | 239 | -- 240 | -- Table structure for table `ipblocks` 241 | -- 242 | 243 | DROP TABLE IF EXISTS `ipblocks`; 244 | /*!40101 SET @saved_cs_client = @@character_set_client */; 245 | /*!40101 SET character_set_client = utf8 */; 246 | CREATE TABLE `ipblocks` ( 247 | `ipb_id` int(11) NOT NULL AUTO_INCREMENT, 248 | `ipb_address` tinyblob NOT NULL, 249 | `ipb_user` int(10) unsigned NOT NULL DEFAULT '0', 250 | `ipb_by` int(10) unsigned NOT NULL DEFAULT '0', 251 | `ipb_by_text` varbinary(255) NOT NULL DEFAULT '', 252 | `ipb_reason` tinyblob NOT NULL, 253 | `ipb_timestamp` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 254 | `ipb_auto` tinyint(1) NOT NULL DEFAULT '0', 255 | `ipb_anon_only` tinyint(1) NOT NULL DEFAULT '0', 256 | `ipb_create_account` tinyint(1) NOT NULL DEFAULT '1', 257 | `ipb_enable_autoblock` tinyint(1) NOT NULL DEFAULT '1', 258 | `ipb_expiry` varbinary(14) NOT NULL DEFAULT '', 259 | `ipb_range_start` tinyblob NOT NULL, 260 | `ipb_range_end` tinyblob NOT NULL, 261 | `ipb_deleted` tinyint(1) NOT NULL DEFAULT '0', 262 | `ipb_block_email` tinyint(1) NOT NULL DEFAULT '0', 263 | `ipb_allow_usertalk` tinyint(1) NOT NULL DEFAULT '0', 264 | PRIMARY KEY (`ipb_id`), 265 | UNIQUE KEY `ipb_address` (`ipb_address`(255),`ipb_user`,`ipb_auto`,`ipb_anon_only`), 266 | KEY `ipb_user` (`ipb_user`), 267 | KEY `ipb_range` (`ipb_range_start`(8),`ipb_range_end`(8)), 268 | KEY `ipb_timestamp` (`ipb_timestamp`), 269 | KEY `ipb_expiry` (`ipb_expiry`) 270 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 271 | /*!40101 SET character_set_client = @saved_cs_client */; 272 | 273 | -- 274 | -- Table structure for table `job` 275 | -- 276 | 277 | DROP TABLE IF EXISTS `job`; 278 | /*!40101 SET @saved_cs_client = @@character_set_client */; 279 | /*!40101 SET character_set_client = utf8 */; 280 | CREATE TABLE `job` ( 281 | `job_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 282 | `job_cmd` varbinary(60) NOT NULL DEFAULT '', 283 | `job_namespace` int(11) NOT NULL, 284 | `job_title` varbinary(255) NOT NULL, 285 | `job_params` blob NOT NULL, 286 | PRIMARY KEY (`job_id`), 287 | KEY `job_cmd` (`job_cmd`,`job_namespace`,`job_title`) 288 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 289 | /*!40101 SET character_set_client = @saved_cs_client */; 290 | 291 | -- 292 | -- Table structure for table `langlinks` 293 | -- 294 | 295 | DROP TABLE IF EXISTS `langlinks`; 296 | /*!40101 SET @saved_cs_client = @@character_set_client */; 297 | /*!40101 SET character_set_client = utf8 */; 298 | CREATE TABLE `langlinks` ( 299 | `ll_from` int(10) unsigned NOT NULL DEFAULT '0', 300 | `ll_lang` varbinary(20) NOT NULL DEFAULT '', 301 | `ll_title` varbinary(255) NOT NULL DEFAULT '', 302 | UNIQUE KEY `ll_from` (`ll_from`,`ll_lang`), 303 | KEY `ll_lang` (`ll_lang`,`ll_title`) 304 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 305 | /*!40101 SET character_set_client = @saved_cs_client */; 306 | 307 | -- 308 | -- Table structure for table `logging` 309 | -- 310 | 311 | DROP TABLE IF EXISTS `logging`; 312 | /*!40101 SET @saved_cs_client = @@character_set_client */; 313 | /*!40101 SET character_set_client = utf8 */; 314 | CREATE TABLE `logging` ( 315 | `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 316 | `log_type` varbinary(10) NOT NULL DEFAULT '', 317 | `log_action` varbinary(10) NOT NULL DEFAULT '', 318 | `log_timestamp` binary(14) NOT NULL DEFAULT '19700101000000', 319 | `log_user` int(10) unsigned NOT NULL DEFAULT '0', 320 | `log_namespace` int(11) NOT NULL DEFAULT '0', 321 | `log_title` varbinary(255) NOT NULL DEFAULT '', 322 | `log_comment` varbinary(255) NOT NULL DEFAULT '', 323 | `log_params` blob NOT NULL, 324 | `log_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0', 325 | PRIMARY KEY (`log_id`), 326 | KEY `type_time` (`log_type`,`log_timestamp`), 327 | KEY `user_time` (`log_user`,`log_timestamp`), 328 | KEY `page_time` (`log_namespace`,`log_title`,`log_timestamp`), 329 | KEY `times` (`log_timestamp`) 330 | ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=binary; 331 | /*!40101 SET character_set_client = @saved_cs_client */; 332 | 333 | -- 334 | -- Table structure for table `math` 335 | -- 336 | 337 | DROP TABLE IF EXISTS `math`; 338 | /*!40101 SET @saved_cs_client = @@character_set_client */; 339 | /*!40101 SET character_set_client = utf8 */; 340 | CREATE TABLE `math` ( 341 | `math_inputhash` varbinary(16) NOT NULL, 342 | `math_outputhash` varbinary(16) NOT NULL, 343 | `math_html_conservativeness` tinyint(4) NOT NULL, 344 | `math_html` blob, 345 | `math_mathml` blob, 346 | UNIQUE KEY `math_inputhash` (`math_inputhash`) 347 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 348 | /*!40101 SET character_set_client = @saved_cs_client */; 349 | 350 | -- 351 | -- Table structure for table `objectcache` 352 | -- 353 | 354 | DROP TABLE IF EXISTS `objectcache`; 355 | /*!40101 SET @saved_cs_client = @@character_set_client */; 356 | /*!40101 SET character_set_client = utf8 */; 357 | CREATE TABLE `objectcache` ( 358 | `keyname` varbinary(255) NOT NULL DEFAULT '', 359 | `value` mediumblob, 360 | `exptime` datetime DEFAULT NULL, 361 | PRIMARY KEY (`keyname`), 362 | KEY `exptime` (`exptime`) 363 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 364 | /*!40101 SET character_set_client = @saved_cs_client */; 365 | 366 | -- 367 | -- Table structure for table `oldimage` 368 | -- 369 | 370 | DROP TABLE IF EXISTS `oldimage`; 371 | /*!40101 SET @saved_cs_client = @@character_set_client */; 372 | /*!40101 SET character_set_client = utf8 */; 373 | CREATE TABLE `oldimage` ( 374 | `oi_name` varbinary(255) NOT NULL DEFAULT '', 375 | `oi_archive_name` varbinary(255) NOT NULL DEFAULT '', 376 | `oi_size` int(10) unsigned NOT NULL DEFAULT '0', 377 | `oi_width` int(11) NOT NULL DEFAULT '0', 378 | `oi_height` int(11) NOT NULL DEFAULT '0', 379 | `oi_bits` int(11) NOT NULL DEFAULT '0', 380 | `oi_description` tinyblob NOT NULL, 381 | `oi_user` int(10) unsigned NOT NULL DEFAULT '0', 382 | `oi_user_text` varbinary(255) NOT NULL, 383 | `oi_timestamp` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 384 | `oi_metadata` mediumblob NOT NULL, 385 | `oi_media_type` enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') DEFAULT NULL, 386 | `oi_major_mime` enum('unknown','application','audio','image','text','video','message','model','multipart') NOT NULL DEFAULT 'unknown', 387 | `oi_minor_mime` varbinary(32) NOT NULL DEFAULT 'unknown', 388 | `oi_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0', 389 | `oi_sha1` varbinary(32) NOT NULL DEFAULT '', 390 | KEY `oi_usertext_timestamp` (`oi_user_text`,`oi_timestamp`), 391 | KEY `oi_name_timestamp` (`oi_name`,`oi_timestamp`), 392 | KEY `oi_name_archive_name` (`oi_name`,`oi_archive_name`(14)), 393 | KEY `oi_sha1` (`oi_sha1`) 394 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 395 | /*!40101 SET character_set_client = @saved_cs_client */; 396 | 397 | -- 398 | -- Table structure for table `page` 399 | -- 400 | 401 | DROP TABLE IF EXISTS `page`; 402 | /*!40101 SET @saved_cs_client = @@character_set_client */; 403 | /*!40101 SET character_set_client = utf8 */; 404 | CREATE TABLE `page` ( 405 | `page_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 406 | `page_namespace` int(11) NOT NULL, 407 | `page_title` varbinary(255) NOT NULL, 408 | `page_restrictions` tinyblob NOT NULL, 409 | `page_counter` bigint(20) unsigned NOT NULL DEFAULT '0', 410 | `page_is_redirect` tinyint(3) unsigned NOT NULL DEFAULT '0', 411 | `page_is_new` tinyint(3) unsigned NOT NULL DEFAULT '0', 412 | `page_random` double unsigned NOT NULL, 413 | `page_touched` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 414 | `page_latest` int(10) unsigned NOT NULL, 415 | `page_len` int(10) unsigned NOT NULL, 416 | PRIMARY KEY (`page_id`), 417 | UNIQUE KEY `name_title` (`page_namespace`,`page_title`), 418 | KEY `page_random` (`page_random`), 419 | KEY `page_len` (`page_len`) 420 | ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=binary; 421 | /*!40101 SET character_set_client = @saved_cs_client */; 422 | 423 | -- 424 | -- Table structure for table `page_props` 425 | -- 426 | 427 | DROP TABLE IF EXISTS `page_props`; 428 | /*!40101 SET @saved_cs_client = @@character_set_client */; 429 | /*!40101 SET character_set_client = utf8 */; 430 | CREATE TABLE `page_props` ( 431 | `pp_page` int(11) NOT NULL, 432 | `pp_propname` varbinary(60) NOT NULL, 433 | `pp_value` blob NOT NULL, 434 | UNIQUE KEY `pp_page_propname` (`pp_page`,`pp_propname`) 435 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 436 | /*!40101 SET character_set_client = @saved_cs_client */; 437 | 438 | -- 439 | -- Table structure for table `page_restrictions` 440 | -- 441 | 442 | DROP TABLE IF EXISTS `page_restrictions`; 443 | /*!40101 SET @saved_cs_client = @@character_set_client */; 444 | /*!40101 SET character_set_client = utf8 */; 445 | CREATE TABLE `page_restrictions` ( 446 | `pr_page` int(11) NOT NULL, 447 | `pr_type` varbinary(60) NOT NULL, 448 | `pr_level` varbinary(60) NOT NULL, 449 | `pr_cascade` tinyint(4) NOT NULL, 450 | `pr_user` int(11) DEFAULT NULL, 451 | `pr_expiry` varbinary(14) DEFAULT NULL, 452 | `pr_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 453 | PRIMARY KEY (`pr_id`), 454 | UNIQUE KEY `pr_pagetype` (`pr_page`,`pr_type`), 455 | KEY `pr_typelevel` (`pr_type`,`pr_level`), 456 | KEY `pr_level` (`pr_level`), 457 | KEY `pr_cascade` (`pr_cascade`) 458 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 459 | /*!40101 SET character_set_client = @saved_cs_client */; 460 | 461 | -- 462 | -- Table structure for table `pagelinks` 463 | -- 464 | 465 | DROP TABLE IF EXISTS `pagelinks`; 466 | /*!40101 SET @saved_cs_client = @@character_set_client */; 467 | /*!40101 SET character_set_client = utf8 */; 468 | CREATE TABLE `pagelinks` ( 469 | `pl_from` int(10) unsigned NOT NULL DEFAULT '0', 470 | `pl_namespace` int(11) NOT NULL DEFAULT '0', 471 | `pl_title` varbinary(255) NOT NULL DEFAULT '', 472 | UNIQUE KEY `pl_from` (`pl_from`,`pl_namespace`,`pl_title`), 473 | UNIQUE KEY `pl_namespace` (`pl_namespace`,`pl_title`,`pl_from`) 474 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 475 | /*!40101 SET character_set_client = @saved_cs_client */; 476 | 477 | -- 478 | -- Table structure for table `protected_titles` 479 | -- 480 | 481 | DROP TABLE IF EXISTS `protected_titles`; 482 | /*!40101 SET @saved_cs_client = @@character_set_client */; 483 | /*!40101 SET character_set_client = utf8 */; 484 | CREATE TABLE `protected_titles` ( 485 | `pt_namespace` int(11) NOT NULL, 486 | `pt_title` varbinary(255) NOT NULL, 487 | `pt_user` int(10) unsigned NOT NULL, 488 | `pt_reason` tinyblob, 489 | `pt_timestamp` binary(14) NOT NULL, 490 | `pt_expiry` varbinary(14) NOT NULL DEFAULT '', 491 | `pt_create_perm` varbinary(60) NOT NULL, 492 | UNIQUE KEY `pt_namespace_title` (`pt_namespace`,`pt_title`), 493 | KEY `pt_timestamp` (`pt_timestamp`) 494 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 495 | /*!40101 SET character_set_client = @saved_cs_client */; 496 | 497 | -- 498 | -- Table structure for table `querycache` 499 | -- 500 | 501 | DROP TABLE IF EXISTS `querycache`; 502 | /*!40101 SET @saved_cs_client = @@character_set_client */; 503 | /*!40101 SET character_set_client = utf8 */; 504 | CREATE TABLE `querycache` ( 505 | `qc_type` varbinary(32) NOT NULL, 506 | `qc_value` int(10) unsigned NOT NULL DEFAULT '0', 507 | `qc_namespace` int(11) NOT NULL DEFAULT '0', 508 | `qc_title` varbinary(255) NOT NULL DEFAULT '', 509 | KEY `qc_type` (`qc_type`,`qc_value`) 510 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 511 | /*!40101 SET character_set_client = @saved_cs_client */; 512 | 513 | -- 514 | -- Table structure for table `querycache_info` 515 | -- 516 | 517 | DROP TABLE IF EXISTS `querycache_info`; 518 | /*!40101 SET @saved_cs_client = @@character_set_client */; 519 | /*!40101 SET character_set_client = utf8 */; 520 | CREATE TABLE `querycache_info` ( 521 | `qci_type` varbinary(32) NOT NULL DEFAULT '', 522 | `qci_timestamp` binary(14) NOT NULL DEFAULT '19700101000000', 523 | UNIQUE KEY `qci_type` (`qci_type`) 524 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 525 | /*!40101 SET character_set_client = @saved_cs_client */; 526 | 527 | -- 528 | -- Table structure for table `querycachetwo` 529 | -- 530 | 531 | DROP TABLE IF EXISTS `querycachetwo`; 532 | /*!40101 SET @saved_cs_client = @@character_set_client */; 533 | /*!40101 SET character_set_client = utf8 */; 534 | CREATE TABLE `querycachetwo` ( 535 | `qcc_type` varbinary(32) NOT NULL, 536 | `qcc_value` int(10) unsigned NOT NULL DEFAULT '0', 537 | `qcc_namespace` int(11) NOT NULL DEFAULT '0', 538 | `qcc_title` varbinary(255) NOT NULL DEFAULT '', 539 | `qcc_namespacetwo` int(11) NOT NULL DEFAULT '0', 540 | `qcc_titletwo` varbinary(255) NOT NULL DEFAULT '', 541 | KEY `qcc_type` (`qcc_type`,`qcc_value`), 542 | KEY `qcc_title` (`qcc_type`,`qcc_namespace`,`qcc_title`), 543 | KEY `qcc_titletwo` (`qcc_type`,`qcc_namespacetwo`,`qcc_titletwo`) 544 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 545 | /*!40101 SET character_set_client = @saved_cs_client */; 546 | 547 | -- 548 | -- Table structure for table `recentchanges` 549 | -- 550 | 551 | DROP TABLE IF EXISTS `recentchanges`; 552 | /*!40101 SET @saved_cs_client = @@character_set_client */; 553 | /*!40101 SET character_set_client = utf8 */; 554 | CREATE TABLE `recentchanges` ( 555 | `rc_id` int(11) NOT NULL AUTO_INCREMENT, 556 | `rc_timestamp` varbinary(14) NOT NULL DEFAULT '', 557 | `rc_cur_time` varbinary(14) NOT NULL DEFAULT '', 558 | `rc_user` int(10) unsigned NOT NULL DEFAULT '0', 559 | `rc_user_text` varbinary(255) NOT NULL, 560 | `rc_namespace` int(11) NOT NULL DEFAULT '0', 561 | `rc_title` varbinary(255) NOT NULL DEFAULT '', 562 | `rc_comment` varbinary(255) NOT NULL DEFAULT '', 563 | `rc_minor` tinyint(3) unsigned NOT NULL DEFAULT '0', 564 | `rc_bot` tinyint(3) unsigned NOT NULL DEFAULT '0', 565 | `rc_new` tinyint(3) unsigned NOT NULL DEFAULT '0', 566 | `rc_cur_id` int(10) unsigned NOT NULL DEFAULT '0', 567 | `rc_this_oldid` int(10) unsigned NOT NULL DEFAULT '0', 568 | `rc_last_oldid` int(10) unsigned NOT NULL DEFAULT '0', 569 | `rc_type` tinyint(3) unsigned NOT NULL DEFAULT '0', 570 | `rc_moved_to_ns` tinyint(3) unsigned NOT NULL DEFAULT '0', 571 | `rc_moved_to_title` varbinary(255) NOT NULL DEFAULT '', 572 | `rc_patrolled` tinyint(3) unsigned NOT NULL DEFAULT '0', 573 | `rc_ip` varbinary(40) NOT NULL DEFAULT '', 574 | `rc_old_len` int(11) DEFAULT NULL, 575 | `rc_new_len` int(11) DEFAULT NULL, 576 | `rc_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0', 577 | `rc_logid` int(10) unsigned NOT NULL DEFAULT '0', 578 | `rc_log_type` varbinary(255) DEFAULT NULL, 579 | `rc_log_action` varbinary(255) DEFAULT NULL, 580 | `rc_params` blob, 581 | PRIMARY KEY (`rc_id`), 582 | KEY `rc_timestamp` (`rc_timestamp`), 583 | KEY `rc_namespace_title` (`rc_namespace`,`rc_title`), 584 | KEY `rc_cur_id` (`rc_cur_id`), 585 | KEY `new_name_timestamp` (`rc_new`,`rc_namespace`,`rc_timestamp`), 586 | KEY `rc_ip` (`rc_ip`), 587 | KEY `rc_ns_usertext` (`rc_namespace`,`rc_user_text`), 588 | KEY `rc_user_text` (`rc_user_text`,`rc_timestamp`) 589 | ) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=binary; 590 | /*!40101 SET character_set_client = @saved_cs_client */; 591 | 592 | -- 593 | -- Table structure for table `redirect` 594 | -- 595 | 596 | DROP TABLE IF EXISTS `redirect`; 597 | /*!40101 SET @saved_cs_client = @@character_set_client */; 598 | /*!40101 SET character_set_client = utf8 */; 599 | CREATE TABLE `redirect` ( 600 | `rd_from` int(10) unsigned NOT NULL DEFAULT '0', 601 | `rd_namespace` int(11) NOT NULL DEFAULT '0', 602 | `rd_title` varbinary(255) NOT NULL DEFAULT '', 603 | PRIMARY KEY (`rd_from`), 604 | KEY `rd_ns_title` (`rd_namespace`,`rd_title`,`rd_from`) 605 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 606 | /*!40101 SET character_set_client = @saved_cs_client */; 607 | 608 | -- 609 | -- Table structure for table `revision` 610 | -- 611 | 612 | DROP TABLE IF EXISTS `revision`; 613 | /*!40101 SET @saved_cs_client = @@character_set_client */; 614 | /*!40101 SET character_set_client = utf8 */; 615 | CREATE TABLE `revision` ( 616 | `rev_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 617 | `rev_page` int(10) unsigned NOT NULL, 618 | `rev_text_id` int(10) unsigned NOT NULL, 619 | `rev_comment` tinyblob NOT NULL, 620 | `rev_user` int(10) unsigned NOT NULL DEFAULT '0', 621 | `rev_user_text` varbinary(255) NOT NULL DEFAULT '', 622 | `rev_timestamp` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 623 | `rev_minor_edit` tinyint(3) unsigned NOT NULL DEFAULT '0', 624 | `rev_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0', 625 | `rev_len` int(10) unsigned DEFAULT NULL, 626 | `rev_parent_id` int(10) unsigned DEFAULT NULL, 627 | PRIMARY KEY (`rev_id`), 628 | UNIQUE KEY `rev_page_id` (`rev_page`,`rev_id`), 629 | KEY `rev_timestamp` (`rev_timestamp`), 630 | KEY `page_timestamp` (`rev_page`,`rev_timestamp`), 631 | KEY `user_timestamp` (`rev_user`,`rev_timestamp`), 632 | KEY `usertext_timestamp` (`rev_user_text`,`rev_timestamp`) 633 | ) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=binary MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; 634 | /*!40101 SET character_set_client = @saved_cs_client */; 635 | 636 | -- 637 | -- Table structure for table `searchindex` 638 | -- 639 | 640 | DROP TABLE IF EXISTS `searchindex`; 641 | /*!40101 SET @saved_cs_client = @@character_set_client */; 642 | /*!40101 SET character_set_client = utf8 */; 643 | CREATE TABLE `searchindex` ( 644 | `si_page` int(10) unsigned NOT NULL, 645 | `si_title` varchar(255) NOT NULL DEFAULT '', 646 | `si_text` mediumtext NOT NULL, 647 | UNIQUE KEY `si_page` (`si_page`), 648 | FULLTEXT KEY `si_title` (`si_title`), 649 | FULLTEXT KEY `si_text` (`si_text`) 650 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 651 | /*!40101 SET character_set_client = @saved_cs_client */; 652 | 653 | -- 654 | -- Table structure for table `site_stats` 655 | -- 656 | 657 | DROP TABLE IF EXISTS `site_stats`; 658 | /*!40101 SET @saved_cs_client = @@character_set_client */; 659 | /*!40101 SET character_set_client = utf8 */; 660 | CREATE TABLE `site_stats` ( 661 | `ss_row_id` int(10) unsigned NOT NULL, 662 | `ss_total_views` bigint(20) unsigned DEFAULT '0', 663 | `ss_total_edits` bigint(20) unsigned DEFAULT '0', 664 | `ss_good_articles` bigint(20) unsigned DEFAULT '0', 665 | `ss_total_pages` bigint(20) DEFAULT '-1', 666 | `ss_users` bigint(20) DEFAULT '-1', 667 | `ss_active_users` bigint(20) DEFAULT '-1', 668 | `ss_admins` int(11) DEFAULT '-1', 669 | `ss_images` int(11) DEFAULT '0', 670 | UNIQUE KEY `ss_row_id` (`ss_row_id`) 671 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 672 | /*!40101 SET character_set_client = @saved_cs_client */; 673 | 674 | -- 675 | -- Table structure for table `tag_summary` 676 | -- 677 | 678 | DROP TABLE IF EXISTS `tag_summary`; 679 | /*!40101 SET @saved_cs_client = @@character_set_client */; 680 | /*!40101 SET character_set_client = utf8 */; 681 | CREATE TABLE `tag_summary` ( 682 | `ts_rc_id` int(11) DEFAULT NULL, 683 | `ts_log_id` int(11) DEFAULT NULL, 684 | `ts_rev_id` int(11) DEFAULT NULL, 685 | `ts_tags` blob NOT NULL, 686 | UNIQUE KEY `tag_summary_rc_id` (`ts_rc_id`), 687 | UNIQUE KEY `tag_summary_log_id` (`ts_log_id`), 688 | UNIQUE KEY `tag_summary_rev_id` (`ts_rev_id`) 689 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 690 | /*!40101 SET character_set_client = @saved_cs_client */; 691 | 692 | -- 693 | -- Table structure for table `templatelinks` 694 | -- 695 | 696 | DROP TABLE IF EXISTS `templatelinks`; 697 | /*!40101 SET @saved_cs_client = @@character_set_client */; 698 | /*!40101 SET character_set_client = utf8 */; 699 | CREATE TABLE `templatelinks` ( 700 | `tl_from` int(10) unsigned NOT NULL DEFAULT '0', 701 | `tl_namespace` int(11) NOT NULL DEFAULT '0', 702 | `tl_title` varbinary(255) NOT NULL DEFAULT '', 703 | UNIQUE KEY `tl_from` (`tl_from`,`tl_namespace`,`tl_title`), 704 | UNIQUE KEY `tl_namespace` (`tl_namespace`,`tl_title`,`tl_from`) 705 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 706 | /*!40101 SET character_set_client = @saved_cs_client */; 707 | 708 | -- 709 | -- Table structure for table `text` 710 | -- 711 | 712 | DROP TABLE IF EXISTS `text`; 713 | /*!40101 SET @saved_cs_client = @@character_set_client */; 714 | /*!40101 SET character_set_client = utf8 */; 715 | CREATE TABLE `text` ( 716 | `old_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 717 | `old_text` mediumblob NOT NULL, 718 | `old_flags` tinyblob NOT NULL, 719 | PRIMARY KEY (`old_id`) 720 | ) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=binary MAX_ROWS=10000000 AVG_ROW_LENGTH=10240; 721 | /*!40101 SET character_set_client = @saved_cs_client */; 722 | 723 | -- 724 | -- Table structure for table `trackbacks` 725 | -- 726 | 727 | DROP TABLE IF EXISTS `trackbacks`; 728 | /*!40101 SET @saved_cs_client = @@character_set_client */; 729 | /*!40101 SET character_set_client = utf8 */; 730 | CREATE TABLE `trackbacks` ( 731 | `tb_id` int(11) NOT NULL AUTO_INCREMENT, 732 | `tb_page` int(11) DEFAULT NULL, 733 | `tb_title` varbinary(255) NOT NULL, 734 | `tb_url` blob NOT NULL, 735 | `tb_ex` blob, 736 | `tb_name` varbinary(255) DEFAULT NULL, 737 | PRIMARY KEY (`tb_id`), 738 | KEY `tb_page` (`tb_page`) 739 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 740 | /*!40101 SET character_set_client = @saved_cs_client */; 741 | 742 | -- 743 | -- Table structure for table `transcache` 744 | -- 745 | 746 | DROP TABLE IF EXISTS `transcache`; 747 | /*!40101 SET @saved_cs_client = @@character_set_client */; 748 | /*!40101 SET character_set_client = utf8 */; 749 | CREATE TABLE `transcache` ( 750 | `tc_url` varbinary(255) NOT NULL, 751 | `tc_contents` blob, 752 | `tc_time` int(11) NOT NULL, 753 | UNIQUE KEY `tc_url_idx` (`tc_url`) 754 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 755 | /*!40101 SET character_set_client = @saved_cs_client */; 756 | 757 | -- 758 | -- Table structure for table `updatelog` 759 | -- 760 | 761 | DROP TABLE IF EXISTS `updatelog`; 762 | /*!40101 SET @saved_cs_client = @@character_set_client */; 763 | /*!40101 SET character_set_client = utf8 */; 764 | CREATE TABLE `updatelog` ( 765 | `ul_key` varbinary(255) NOT NULL, 766 | PRIMARY KEY (`ul_key`) 767 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 768 | /*!40101 SET character_set_client = @saved_cs_client */; 769 | 770 | -- 771 | -- Table structure for table `user` 772 | -- 773 | 774 | DROP TABLE IF EXISTS `user`; 775 | /*!40101 SET @saved_cs_client = @@character_set_client */; 776 | /*!40101 SET character_set_client = utf8 */; 777 | CREATE TABLE `user` ( 778 | `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 779 | `user_name` varbinary(255) NOT NULL DEFAULT '', 780 | `user_real_name` varbinary(255) NOT NULL DEFAULT '', 781 | `user_password` tinyblob NOT NULL, 782 | `user_newpassword` tinyblob NOT NULL, 783 | `user_newpass_time` binary(14) DEFAULT NULL, 784 | `user_email` tinyblob NOT NULL, 785 | `user_options` blob NOT NULL, 786 | `user_touched` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 787 | `user_token` binary(32) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 788 | `user_email_authenticated` binary(14) DEFAULT NULL, 789 | `user_email_token` binary(32) DEFAULT NULL, 790 | `user_email_token_expires` binary(14) DEFAULT NULL, 791 | `user_registration` binary(14) DEFAULT NULL, 792 | `user_editcount` int(11) DEFAULT NULL, 793 | PRIMARY KEY (`user_id`), 794 | UNIQUE KEY `user_name` (`user_name`), 795 | KEY `user_email_token` (`user_email_token`) 796 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=binary; 797 | /*!40101 SET character_set_client = @saved_cs_client */; 798 | 799 | -- 800 | -- Table structure for table `user_groups` 801 | -- 802 | 803 | DROP TABLE IF EXISTS `user_groups`; 804 | /*!40101 SET @saved_cs_client = @@character_set_client */; 805 | /*!40101 SET character_set_client = utf8 */; 806 | CREATE TABLE `user_groups` ( 807 | `ug_user` int(10) unsigned NOT NULL DEFAULT '0', 808 | `ug_group` varbinary(16) NOT NULL DEFAULT '', 809 | UNIQUE KEY `ug_user_group` (`ug_user`,`ug_group`), 810 | KEY `ug_group` (`ug_group`) 811 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 812 | /*!40101 SET character_set_client = @saved_cs_client */; 813 | 814 | -- 815 | -- Table structure for table `user_newtalk` 816 | -- 817 | 818 | DROP TABLE IF EXISTS `user_newtalk`; 819 | /*!40101 SET @saved_cs_client = @@character_set_client */; 820 | /*!40101 SET character_set_client = utf8 */; 821 | CREATE TABLE `user_newtalk` ( 822 | `user_id` int(11) NOT NULL DEFAULT '0', 823 | `user_ip` varbinary(40) NOT NULL DEFAULT '', 824 | `user_last_timestamp` binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 825 | KEY `user_id` (`user_id`), 826 | KEY `user_ip` (`user_ip`) 827 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 828 | /*!40101 SET character_set_client = @saved_cs_client */; 829 | 830 | -- 831 | -- Table structure for table `valid_tag` 832 | -- 833 | 834 | DROP TABLE IF EXISTS `valid_tag`; 835 | /*!40101 SET @saved_cs_client = @@character_set_client */; 836 | /*!40101 SET character_set_client = utf8 */; 837 | CREATE TABLE `valid_tag` ( 838 | `vt_tag` varbinary(255) NOT NULL, 839 | PRIMARY KEY (`vt_tag`) 840 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 841 | /*!40101 SET character_set_client = @saved_cs_client */; 842 | 843 | -- 844 | -- Table structure for table `watchlist` 845 | -- 846 | 847 | DROP TABLE IF EXISTS `watchlist`; 848 | /*!40101 SET @saved_cs_client = @@character_set_client */; 849 | /*!40101 SET character_set_client = utf8 */; 850 | CREATE TABLE `watchlist` ( 851 | `wl_user` int(10) unsigned NOT NULL, 852 | `wl_namespace` int(11) NOT NULL DEFAULT '0', 853 | `wl_title` varbinary(255) NOT NULL DEFAULT '', 854 | `wl_notificationtimestamp` varbinary(14) DEFAULT NULL, 855 | UNIQUE KEY `wl_user` (`wl_user`,`wl_namespace`,`wl_title`), 856 | KEY `namespace_title` (`wl_namespace`,`wl_title`) 857 | ) ENGINE=MyISAM DEFAULT CHARSET=binary; 858 | /*!40101 SET character_set_client = @saved_cs_client */; 859 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 860 | 861 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 862 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 863 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 864 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 865 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 866 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 867 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 868 | 869 | -- Dump completed on 2012-11-22 12:40:04 870 | -------------------------------------------------------------------------------- /drupal.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.1.47, for unknown-linux-gnu (x86_64) 2 | -- 3 | -- Host: localhost Database: drupal 4 | -- ------------------------------------------------------ 5 | -- Server version 5.5.8-log 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Current Database: `drupal` 20 | -- 21 | 22 | CREATE DATABASE /*!32312 IF NOT EXISTS*/ `drupal` /*!40100 DEFAULT CHARACTER SET latin1 */; 23 | 24 | USE `drupal`; 25 | 26 | -- 27 | -- Table structure for table `access` 28 | -- 29 | 30 | DROP TABLE IF EXISTS `access`; 31 | /*!40101 SET @saved_cs_client = @@character_set_client */; 32 | /*!40101 SET character_set_client = utf8 */; 33 | CREATE TABLE `access` ( 34 | `aid` int(11) NOT NULL AUTO_INCREMENT, 35 | `mask` varchar(255) NOT NULL DEFAULT '', 36 | `type` varchar(255) NOT NULL DEFAULT '', 37 | `status` tinyint(4) NOT NULL DEFAULT '0', 38 | PRIMARY KEY (`aid`) 39 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 40 | /*!40101 SET character_set_client = @saved_cs_client */; 41 | 42 | -- 43 | -- Table structure for table `actions` 44 | -- 45 | 46 | DROP TABLE IF EXISTS `actions`; 47 | /*!40101 SET @saved_cs_client = @@character_set_client */; 48 | /*!40101 SET character_set_client = utf8 */; 49 | CREATE TABLE `actions` ( 50 | `aid` varchar(255) NOT NULL DEFAULT '0', 51 | `type` varchar(32) NOT NULL DEFAULT '', 52 | `callback` varchar(255) NOT NULL DEFAULT '', 53 | `parameters` longtext NOT NULL, 54 | `description` varchar(255) NOT NULL DEFAULT '0', 55 | PRIMARY KEY (`aid`) 56 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 57 | /*!40101 SET character_set_client = @saved_cs_client */; 58 | 59 | -- 60 | -- Table structure for table `actions_aid` 61 | -- 62 | 63 | DROP TABLE IF EXISTS `actions_aid`; 64 | /*!40101 SET @saved_cs_client = @@character_set_client */; 65 | /*!40101 SET character_set_client = utf8 */; 66 | CREATE TABLE `actions_aid` ( 67 | `aid` int(10) unsigned NOT NULL AUTO_INCREMENT, 68 | PRIMARY KEY (`aid`) 69 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 70 | /*!40101 SET character_set_client = @saved_cs_client */; 71 | 72 | -- 73 | -- Table structure for table `aggregator_category` 74 | -- 75 | 76 | DROP TABLE IF EXISTS `aggregator_category`; 77 | /*!40101 SET @saved_cs_client = @@character_set_client */; 78 | /*!40101 SET character_set_client = utf8 */; 79 | CREATE TABLE `aggregator_category` ( 80 | `cid` int(11) NOT NULL AUTO_INCREMENT, 81 | `title` varchar(255) NOT NULL DEFAULT '', 82 | `description` longtext NOT NULL, 83 | `block` tinyint(4) NOT NULL DEFAULT '0', 84 | PRIMARY KEY (`cid`), 85 | UNIQUE KEY `title` (`title`) 86 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 87 | /*!40101 SET character_set_client = @saved_cs_client */; 88 | 89 | -- 90 | -- Table structure for table `aggregator_category_feed` 91 | -- 92 | 93 | DROP TABLE IF EXISTS `aggregator_category_feed`; 94 | /*!40101 SET @saved_cs_client = @@character_set_client */; 95 | /*!40101 SET character_set_client = utf8 */; 96 | CREATE TABLE `aggregator_category_feed` ( 97 | `fid` int(11) NOT NULL DEFAULT '0', 98 | `cid` int(11) NOT NULL DEFAULT '0', 99 | PRIMARY KEY (`cid`,`fid`), 100 | KEY `fid` (`fid`) 101 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 102 | /*!40101 SET character_set_client = @saved_cs_client */; 103 | 104 | -- 105 | -- Table structure for table `aggregator_category_item` 106 | -- 107 | 108 | DROP TABLE IF EXISTS `aggregator_category_item`; 109 | /*!40101 SET @saved_cs_client = @@character_set_client */; 110 | /*!40101 SET character_set_client = utf8 */; 111 | CREATE TABLE `aggregator_category_item` ( 112 | `iid` int(11) NOT NULL DEFAULT '0', 113 | `cid` int(11) NOT NULL DEFAULT '0', 114 | PRIMARY KEY (`cid`,`iid`), 115 | KEY `iid` (`iid`) 116 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 117 | /*!40101 SET character_set_client = @saved_cs_client */; 118 | 119 | -- 120 | -- Table structure for table `aggregator_feed` 121 | -- 122 | 123 | DROP TABLE IF EXISTS `aggregator_feed`; 124 | /*!40101 SET @saved_cs_client = @@character_set_client */; 125 | /*!40101 SET character_set_client = utf8 */; 126 | CREATE TABLE `aggregator_feed` ( 127 | `fid` int(11) NOT NULL AUTO_INCREMENT, 128 | `title` varchar(255) NOT NULL DEFAULT '', 129 | `url` varchar(255) NOT NULL DEFAULT '', 130 | `refresh` int(11) NOT NULL DEFAULT '0', 131 | `checked` int(11) NOT NULL DEFAULT '0', 132 | `link` varchar(255) NOT NULL DEFAULT '', 133 | `description` longtext NOT NULL, 134 | `image` longtext NOT NULL, 135 | `etag` varchar(255) NOT NULL DEFAULT '', 136 | `modified` int(11) NOT NULL DEFAULT '0', 137 | `block` tinyint(4) NOT NULL DEFAULT '0', 138 | PRIMARY KEY (`fid`), 139 | UNIQUE KEY `url` (`url`), 140 | UNIQUE KEY `title` (`title`) 141 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 142 | /*!40101 SET character_set_client = @saved_cs_client */; 143 | 144 | -- 145 | -- Table structure for table `aggregator_item` 146 | -- 147 | 148 | DROP TABLE IF EXISTS `aggregator_item`; 149 | /*!40101 SET @saved_cs_client = @@character_set_client */; 150 | /*!40101 SET character_set_client = utf8 */; 151 | CREATE TABLE `aggregator_item` ( 152 | `iid` int(11) NOT NULL AUTO_INCREMENT, 153 | `fid` int(11) NOT NULL DEFAULT '0', 154 | `title` varchar(255) NOT NULL DEFAULT '', 155 | `link` varchar(255) NOT NULL DEFAULT '', 156 | `author` varchar(255) NOT NULL DEFAULT '', 157 | `description` longtext NOT NULL, 158 | `timestamp` int(11) DEFAULT NULL, 159 | `guid` varchar(255) DEFAULT NULL, 160 | PRIMARY KEY (`iid`), 161 | KEY `fid` (`fid`) 162 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 163 | /*!40101 SET character_set_client = @saved_cs_client */; 164 | 165 | -- 166 | -- Table structure for table `authmap` 167 | -- 168 | 169 | DROP TABLE IF EXISTS `authmap`; 170 | /*!40101 SET @saved_cs_client = @@character_set_client */; 171 | /*!40101 SET character_set_client = utf8 */; 172 | CREATE TABLE `authmap` ( 173 | `aid` int(10) unsigned NOT NULL AUTO_INCREMENT, 174 | `uid` int(11) NOT NULL DEFAULT '0', 175 | `authname` varchar(128) NOT NULL DEFAULT '', 176 | `module` varchar(128) NOT NULL DEFAULT '', 177 | PRIMARY KEY (`aid`), 178 | UNIQUE KEY `authname` (`authname`) 179 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 180 | /*!40101 SET character_set_client = @saved_cs_client */; 181 | 182 | -- 183 | -- Table structure for table `batch` 184 | -- 185 | 186 | DROP TABLE IF EXISTS `batch`; 187 | /*!40101 SET @saved_cs_client = @@character_set_client */; 188 | /*!40101 SET character_set_client = utf8 */; 189 | CREATE TABLE `batch` ( 190 | `bid` int(10) unsigned NOT NULL AUTO_INCREMENT, 191 | `token` varchar(64) NOT NULL, 192 | `timestamp` int(11) NOT NULL, 193 | `batch` longtext, 194 | PRIMARY KEY (`bid`), 195 | KEY `token` (`token`) 196 | ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 197 | /*!40101 SET character_set_client = @saved_cs_client */; 198 | 199 | -- 200 | -- Table structure for table `blocks` 201 | -- 202 | 203 | DROP TABLE IF EXISTS `blocks`; 204 | /*!40101 SET @saved_cs_client = @@character_set_client */; 205 | /*!40101 SET character_set_client = utf8 */; 206 | CREATE TABLE `blocks` ( 207 | `bid` int(11) NOT NULL AUTO_INCREMENT, 208 | `module` varchar(64) NOT NULL DEFAULT '', 209 | `delta` varchar(32) NOT NULL DEFAULT '0', 210 | `theme` varchar(64) NOT NULL DEFAULT '', 211 | `status` tinyint(4) NOT NULL DEFAULT '0', 212 | `weight` tinyint(4) NOT NULL DEFAULT '0', 213 | `region` varchar(64) NOT NULL DEFAULT '', 214 | `custom` tinyint(4) NOT NULL DEFAULT '0', 215 | `throttle` tinyint(4) NOT NULL DEFAULT '0', 216 | `visibility` tinyint(4) NOT NULL DEFAULT '0', 217 | `pages` text NOT NULL, 218 | `title` varchar(64) NOT NULL DEFAULT '', 219 | `cache` tinyint(4) NOT NULL DEFAULT '1', 220 | PRIMARY KEY (`bid`), 221 | UNIQUE KEY `tmd` (`theme`,`module`,`delta`), 222 | KEY `list` (`theme`,`status`,`region`,`weight`,`module`) 223 | ) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; 224 | /*!40101 SET character_set_client = @saved_cs_client */; 225 | 226 | -- 227 | -- Table structure for table `blocks_roles` 228 | -- 229 | 230 | DROP TABLE IF EXISTS `blocks_roles`; 231 | /*!40101 SET @saved_cs_client = @@character_set_client */; 232 | /*!40101 SET character_set_client = utf8 */; 233 | CREATE TABLE `blocks_roles` ( 234 | `module` varchar(64) NOT NULL, 235 | `delta` varchar(32) NOT NULL, 236 | `rid` int(10) unsigned NOT NULL, 237 | PRIMARY KEY (`module`,`delta`,`rid`), 238 | KEY `rid` (`rid`) 239 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 240 | /*!40101 SET character_set_client = @saved_cs_client */; 241 | 242 | -- 243 | -- Table structure for table `boxes` 244 | -- 245 | 246 | DROP TABLE IF EXISTS `boxes`; 247 | /*!40101 SET @saved_cs_client = @@character_set_client */; 248 | /*!40101 SET character_set_client = utf8 */; 249 | CREATE TABLE `boxes` ( 250 | `bid` int(10) unsigned NOT NULL AUTO_INCREMENT, 251 | `body` longtext, 252 | `info` varchar(128) NOT NULL DEFAULT '', 253 | `format` smallint(6) NOT NULL DEFAULT '0', 254 | PRIMARY KEY (`bid`), 255 | UNIQUE KEY `info` (`info`) 256 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 257 | /*!40101 SET character_set_client = @saved_cs_client */; 258 | 259 | -- 260 | -- Table structure for table `cache` 261 | -- 262 | 263 | DROP TABLE IF EXISTS `cache`; 264 | /*!40101 SET @saved_cs_client = @@character_set_client */; 265 | /*!40101 SET character_set_client = utf8 */; 266 | CREATE TABLE `cache` ( 267 | `cid` varchar(255) NOT NULL DEFAULT '', 268 | `data` longblob, 269 | `expire` int(11) NOT NULL DEFAULT '0', 270 | `created` int(11) NOT NULL DEFAULT '0', 271 | `headers` text, 272 | `serialized` smallint(6) NOT NULL DEFAULT '0', 273 | PRIMARY KEY (`cid`), 274 | KEY `expire` (`expire`) 275 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 276 | /*!40101 SET character_set_client = @saved_cs_client */; 277 | 278 | -- 279 | -- Table structure for table `cache_block` 280 | -- 281 | 282 | DROP TABLE IF EXISTS `cache_block`; 283 | /*!40101 SET @saved_cs_client = @@character_set_client */; 284 | /*!40101 SET character_set_client = utf8 */; 285 | CREATE TABLE `cache_block` ( 286 | `cid` varchar(255) NOT NULL DEFAULT '', 287 | `data` longblob, 288 | `expire` int(11) NOT NULL DEFAULT '0', 289 | `created` int(11) NOT NULL DEFAULT '0', 290 | `headers` text, 291 | `serialized` smallint(6) NOT NULL DEFAULT '0', 292 | PRIMARY KEY (`cid`), 293 | KEY `expire` (`expire`) 294 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 295 | /*!40101 SET character_set_client = @saved_cs_client */; 296 | 297 | -- 298 | -- Table structure for table `cache_filter` 299 | -- 300 | 301 | DROP TABLE IF EXISTS `cache_filter`; 302 | /*!40101 SET @saved_cs_client = @@character_set_client */; 303 | /*!40101 SET character_set_client = utf8 */; 304 | CREATE TABLE `cache_filter` ( 305 | `cid` varchar(255) NOT NULL DEFAULT '', 306 | `data` longblob, 307 | `expire` int(11) NOT NULL DEFAULT '0', 308 | `created` int(11) NOT NULL DEFAULT '0', 309 | `headers` text, 310 | `serialized` smallint(6) NOT NULL DEFAULT '0', 311 | PRIMARY KEY (`cid`), 312 | KEY `expire` (`expire`) 313 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 314 | /*!40101 SET character_set_client = @saved_cs_client */; 315 | 316 | -- 317 | -- Table structure for table `cache_form` 318 | -- 319 | 320 | DROP TABLE IF EXISTS `cache_form`; 321 | /*!40101 SET @saved_cs_client = @@character_set_client */; 322 | /*!40101 SET character_set_client = utf8 */; 323 | CREATE TABLE `cache_form` ( 324 | `cid` varchar(255) NOT NULL DEFAULT '', 325 | `data` longblob, 326 | `expire` int(11) NOT NULL DEFAULT '0', 327 | `created` int(11) NOT NULL DEFAULT '0', 328 | `headers` text, 329 | `serialized` smallint(6) NOT NULL DEFAULT '0', 330 | PRIMARY KEY (`cid`), 331 | KEY `expire` (`expire`) 332 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 333 | /*!40101 SET character_set_client = @saved_cs_client */; 334 | 335 | -- 336 | -- Table structure for table `cache_menu` 337 | -- 338 | 339 | DROP TABLE IF EXISTS `cache_menu`; 340 | /*!40101 SET @saved_cs_client = @@character_set_client */; 341 | /*!40101 SET character_set_client = utf8 */; 342 | CREATE TABLE `cache_menu` ( 343 | `cid` varchar(255) NOT NULL DEFAULT '', 344 | `data` longblob, 345 | `expire` int(11) NOT NULL DEFAULT '0', 346 | `created` int(11) NOT NULL DEFAULT '0', 347 | `headers` text, 348 | `serialized` smallint(6) NOT NULL DEFAULT '0', 349 | PRIMARY KEY (`cid`), 350 | KEY `expire` (`expire`) 351 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 352 | /*!40101 SET character_set_client = @saved_cs_client */; 353 | 354 | -- 355 | -- Table structure for table `cache_page` 356 | -- 357 | 358 | DROP TABLE IF EXISTS `cache_page`; 359 | /*!40101 SET @saved_cs_client = @@character_set_client */; 360 | /*!40101 SET character_set_client = utf8 */; 361 | CREATE TABLE `cache_page` ( 362 | `cid` varchar(255) NOT NULL DEFAULT '', 363 | `data` longblob, 364 | `expire` int(11) NOT NULL DEFAULT '0', 365 | `created` int(11) NOT NULL DEFAULT '0', 366 | `headers` text, 367 | `serialized` smallint(6) NOT NULL DEFAULT '0', 368 | PRIMARY KEY (`cid`), 369 | KEY `expire` (`expire`) 370 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 371 | /*!40101 SET character_set_client = @saved_cs_client */; 372 | 373 | -- 374 | -- Table structure for table `cache_update` 375 | -- 376 | 377 | DROP TABLE IF EXISTS `cache_update`; 378 | /*!40101 SET @saved_cs_client = @@character_set_client */; 379 | /*!40101 SET character_set_client = utf8 */; 380 | CREATE TABLE `cache_update` ( 381 | `cid` varchar(255) NOT NULL DEFAULT '', 382 | `data` longblob, 383 | `expire` int(11) NOT NULL DEFAULT '0', 384 | `created` int(11) NOT NULL DEFAULT '0', 385 | `headers` text, 386 | `serialized` smallint(6) NOT NULL DEFAULT '0', 387 | PRIMARY KEY (`cid`), 388 | KEY `expire` (`expire`) 389 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 390 | /*!40101 SET character_set_client = @saved_cs_client */; 391 | 392 | -- 393 | -- Table structure for table `comments` 394 | -- 395 | 396 | DROP TABLE IF EXISTS `comments`; 397 | /*!40101 SET @saved_cs_client = @@character_set_client */; 398 | /*!40101 SET character_set_client = utf8 */; 399 | CREATE TABLE `comments` ( 400 | `cid` int(11) NOT NULL AUTO_INCREMENT, 401 | `pid` int(11) NOT NULL DEFAULT '0', 402 | `nid` int(11) NOT NULL DEFAULT '0', 403 | `uid` int(11) NOT NULL DEFAULT '0', 404 | `subject` varchar(64) NOT NULL DEFAULT '', 405 | `comment` longtext NOT NULL, 406 | `hostname` varchar(128) NOT NULL DEFAULT '', 407 | `timestamp` int(11) NOT NULL DEFAULT '0', 408 | `status` tinyint(3) unsigned NOT NULL DEFAULT '0', 409 | `format` smallint(6) NOT NULL DEFAULT '0', 410 | `thread` varchar(255) NOT NULL, 411 | `name` varchar(60) DEFAULT NULL, 412 | `mail` varchar(64) DEFAULT NULL, 413 | `homepage` varchar(255) DEFAULT NULL, 414 | PRIMARY KEY (`cid`), 415 | KEY `pid` (`pid`), 416 | KEY `nid` (`nid`), 417 | KEY `status` (`status`) 418 | ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 419 | /*!40101 SET character_set_client = @saved_cs_client */; 420 | 421 | -- 422 | -- Table structure for table `contact` 423 | -- 424 | 425 | DROP TABLE IF EXISTS `contact`; 426 | /*!40101 SET @saved_cs_client = @@character_set_client */; 427 | /*!40101 SET character_set_client = utf8 */; 428 | CREATE TABLE `contact` ( 429 | `cid` int(10) unsigned NOT NULL AUTO_INCREMENT, 430 | `category` varchar(255) NOT NULL DEFAULT '', 431 | `recipients` longtext NOT NULL, 432 | `reply` longtext NOT NULL, 433 | `weight` tinyint(4) NOT NULL DEFAULT '0', 434 | `selected` tinyint(4) NOT NULL DEFAULT '0', 435 | PRIMARY KEY (`cid`), 436 | UNIQUE KEY `category` (`category`), 437 | KEY `list` (`weight`,`category`) 438 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 439 | /*!40101 SET character_set_client = @saved_cs_client */; 440 | 441 | -- 442 | -- Table structure for table `files` 443 | -- 444 | 445 | DROP TABLE IF EXISTS `files`; 446 | /*!40101 SET @saved_cs_client = @@character_set_client */; 447 | /*!40101 SET character_set_client = utf8 */; 448 | CREATE TABLE `files` ( 449 | `fid` int(10) unsigned NOT NULL AUTO_INCREMENT, 450 | `uid` int(10) unsigned NOT NULL DEFAULT '0', 451 | `filename` varchar(255) NOT NULL DEFAULT '', 452 | `filepath` varchar(255) NOT NULL DEFAULT '', 453 | `filemime` varchar(255) NOT NULL DEFAULT '', 454 | `filesize` int(10) unsigned NOT NULL DEFAULT '0', 455 | `status` int(11) NOT NULL DEFAULT '0', 456 | `timestamp` int(10) unsigned NOT NULL DEFAULT '0', 457 | PRIMARY KEY (`fid`), 458 | KEY `uid` (`uid`), 459 | KEY `status` (`status`), 460 | KEY `timestamp` (`timestamp`) 461 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 462 | /*!40101 SET character_set_client = @saved_cs_client */; 463 | 464 | -- 465 | -- Table structure for table `filter_formats` 466 | -- 467 | 468 | DROP TABLE IF EXISTS `filter_formats`; 469 | /*!40101 SET @saved_cs_client = @@character_set_client */; 470 | /*!40101 SET character_set_client = utf8 */; 471 | CREATE TABLE `filter_formats` ( 472 | `format` int(11) NOT NULL AUTO_INCREMENT, 473 | `name` varchar(255) NOT NULL DEFAULT '', 474 | `roles` varchar(255) NOT NULL DEFAULT '', 475 | `cache` tinyint(4) NOT NULL DEFAULT '0', 476 | PRIMARY KEY (`format`), 477 | UNIQUE KEY `name` (`name`) 478 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 479 | /*!40101 SET character_set_client = @saved_cs_client */; 480 | 481 | -- 482 | -- Table structure for table `filters` 483 | -- 484 | 485 | DROP TABLE IF EXISTS `filters`; 486 | /*!40101 SET @saved_cs_client = @@character_set_client */; 487 | /*!40101 SET character_set_client = utf8 */; 488 | CREATE TABLE `filters` ( 489 | `fid` int(11) NOT NULL AUTO_INCREMENT, 490 | `format` int(11) NOT NULL DEFAULT '0', 491 | `module` varchar(64) NOT NULL DEFAULT '', 492 | `delta` tinyint(4) NOT NULL DEFAULT '0', 493 | `weight` tinyint(4) NOT NULL DEFAULT '0', 494 | PRIMARY KEY (`fid`), 495 | UNIQUE KEY `fmd` (`format`,`module`,`delta`), 496 | KEY `list` (`format`,`weight`,`module`,`delta`) 497 | ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; 498 | /*!40101 SET character_set_client = @saved_cs_client */; 499 | 500 | -- 501 | -- Table structure for table `flood` 502 | -- 503 | 504 | DROP TABLE IF EXISTS `flood`; 505 | /*!40101 SET @saved_cs_client = @@character_set_client */; 506 | /*!40101 SET character_set_client = utf8 */; 507 | CREATE TABLE `flood` ( 508 | `fid` int(11) NOT NULL AUTO_INCREMENT, 509 | `event` varchar(64) NOT NULL DEFAULT '', 510 | `hostname` varchar(128) NOT NULL DEFAULT '', 511 | `timestamp` int(11) NOT NULL DEFAULT '0', 512 | PRIMARY KEY (`fid`), 513 | KEY `allow` (`event`,`hostname`,`timestamp`) 514 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 515 | /*!40101 SET character_set_client = @saved_cs_client */; 516 | 517 | -- 518 | -- Table structure for table `history` 519 | -- 520 | 521 | DROP TABLE IF EXISTS `history`; 522 | /*!40101 SET @saved_cs_client = @@character_set_client */; 523 | /*!40101 SET character_set_client = utf8 */; 524 | CREATE TABLE `history` ( 525 | `uid` int(11) NOT NULL DEFAULT '0', 526 | `nid` int(11) NOT NULL DEFAULT '0', 527 | `timestamp` int(11) NOT NULL DEFAULT '0', 528 | PRIMARY KEY (`uid`,`nid`), 529 | KEY `nid` (`nid`) 530 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 531 | /*!40101 SET character_set_client = @saved_cs_client */; 532 | 533 | -- 534 | -- Table structure for table `menu_custom` 535 | -- 536 | 537 | DROP TABLE IF EXISTS `menu_custom`; 538 | /*!40101 SET @saved_cs_client = @@character_set_client */; 539 | /*!40101 SET character_set_client = utf8 */; 540 | CREATE TABLE `menu_custom` ( 541 | `menu_name` varchar(32) NOT NULL DEFAULT '', 542 | `title` varchar(255) NOT NULL DEFAULT '', 543 | `description` text, 544 | PRIMARY KEY (`menu_name`) 545 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 546 | /*!40101 SET character_set_client = @saved_cs_client */; 547 | 548 | -- 549 | -- Table structure for table `menu_links` 550 | -- 551 | 552 | DROP TABLE IF EXISTS `menu_links`; 553 | /*!40101 SET @saved_cs_client = @@character_set_client */; 554 | /*!40101 SET character_set_client = utf8 */; 555 | CREATE TABLE `menu_links` ( 556 | `menu_name` varchar(32) NOT NULL DEFAULT '', 557 | `mlid` int(10) unsigned NOT NULL AUTO_INCREMENT, 558 | `plid` int(10) unsigned NOT NULL DEFAULT '0', 559 | `link_path` varchar(255) NOT NULL DEFAULT '', 560 | `router_path` varchar(255) NOT NULL DEFAULT '', 561 | `link_title` varchar(255) NOT NULL DEFAULT '', 562 | `options` text, 563 | `module` varchar(255) NOT NULL DEFAULT 'system', 564 | `hidden` smallint(6) NOT NULL DEFAULT '0', 565 | `external` smallint(6) NOT NULL DEFAULT '0', 566 | `has_children` smallint(6) NOT NULL DEFAULT '0', 567 | `expanded` smallint(6) NOT NULL DEFAULT '0', 568 | `weight` int(11) NOT NULL DEFAULT '0', 569 | `depth` smallint(6) NOT NULL DEFAULT '0', 570 | `customized` smallint(6) NOT NULL DEFAULT '0', 571 | `p1` int(10) unsigned NOT NULL DEFAULT '0', 572 | `p2` int(10) unsigned NOT NULL DEFAULT '0', 573 | `p3` int(10) unsigned NOT NULL DEFAULT '0', 574 | `p4` int(10) unsigned NOT NULL DEFAULT '0', 575 | `p5` int(10) unsigned NOT NULL DEFAULT '0', 576 | `p6` int(10) unsigned NOT NULL DEFAULT '0', 577 | `p7` int(10) unsigned NOT NULL DEFAULT '0', 578 | `p8` int(10) unsigned NOT NULL DEFAULT '0', 579 | `p9` int(10) unsigned NOT NULL DEFAULT '0', 580 | `updated` smallint(6) NOT NULL DEFAULT '0', 581 | PRIMARY KEY (`mlid`), 582 | KEY `path_menu` (`link_path`(128),`menu_name`), 583 | KEY `menu_plid_expand_child` (`menu_name`,`plid`,`expanded`,`has_children`), 584 | KEY `menu_parents` (`menu_name`,`p1`,`p2`,`p3`,`p4`,`p5`,`p6`,`p7`,`p8`,`p9`), 585 | KEY `router_path` (`router_path`(128)) 586 | ) ENGINE=MyISAM AUTO_INCREMENT=169 DEFAULT CHARSET=utf8; 587 | /*!40101 SET character_set_client = @saved_cs_client */; 588 | 589 | -- 590 | -- Table structure for table `menu_router` 591 | -- 592 | 593 | DROP TABLE IF EXISTS `menu_router`; 594 | /*!40101 SET @saved_cs_client = @@character_set_client */; 595 | /*!40101 SET character_set_client = utf8 */; 596 | CREATE TABLE `menu_router` ( 597 | `path` varchar(255) NOT NULL DEFAULT '', 598 | `load_functions` text NOT NULL, 599 | `to_arg_functions` text NOT NULL, 600 | `access_callback` varchar(255) NOT NULL DEFAULT '', 601 | `access_arguments` text, 602 | `page_callback` varchar(255) NOT NULL DEFAULT '', 603 | `page_arguments` text, 604 | `fit` int(11) NOT NULL DEFAULT '0', 605 | `number_parts` smallint(6) NOT NULL DEFAULT '0', 606 | `tab_parent` varchar(255) NOT NULL DEFAULT '', 607 | `tab_root` varchar(255) NOT NULL DEFAULT '', 608 | `title` varchar(255) NOT NULL DEFAULT '', 609 | `title_callback` varchar(255) NOT NULL DEFAULT '', 610 | `title_arguments` varchar(255) NOT NULL DEFAULT '', 611 | `type` int(11) NOT NULL DEFAULT '0', 612 | `block_callback` varchar(255) NOT NULL DEFAULT '', 613 | `description` text NOT NULL, 614 | `position` varchar(255) NOT NULL DEFAULT '', 615 | `weight` int(11) NOT NULL DEFAULT '0', 616 | `file` mediumtext, 617 | PRIMARY KEY (`path`), 618 | KEY `fit` (`fit`), 619 | KEY `tab_parent` (`tab_parent`) 620 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 621 | /*!40101 SET character_set_client = @saved_cs_client */; 622 | 623 | -- 624 | -- Table structure for table `node` 625 | -- 626 | 627 | DROP TABLE IF EXISTS `node`; 628 | /*!40101 SET @saved_cs_client = @@character_set_client */; 629 | /*!40101 SET character_set_client = utf8 */; 630 | CREATE TABLE `node` ( 631 | `nid` int(10) unsigned NOT NULL AUTO_INCREMENT, 632 | `vid` int(10) unsigned NOT NULL DEFAULT '0', 633 | `type` varchar(32) NOT NULL DEFAULT '', 634 | `language` varchar(12) NOT NULL DEFAULT '', 635 | `title` varchar(255) NOT NULL DEFAULT '', 636 | `uid` int(11) NOT NULL DEFAULT '0', 637 | `status` int(11) NOT NULL DEFAULT '1', 638 | `created` int(11) NOT NULL DEFAULT '0', 639 | `changed` int(11) NOT NULL DEFAULT '0', 640 | `comment` int(11) NOT NULL DEFAULT '0', 641 | `promote` int(11) NOT NULL DEFAULT '0', 642 | `moderate` int(11) NOT NULL DEFAULT '0', 643 | `sticky` int(11) NOT NULL DEFAULT '0', 644 | `tnid` int(10) unsigned NOT NULL DEFAULT '0', 645 | `translate` int(11) NOT NULL DEFAULT '0', 646 | PRIMARY KEY (`nid`), 647 | UNIQUE KEY `vid` (`vid`), 648 | KEY `node_changed` (`changed`), 649 | KEY `node_created` (`created`), 650 | KEY `node_moderate` (`moderate`), 651 | KEY `node_promote_status` (`promote`,`status`), 652 | KEY `node_status_type` (`status`,`type`,`nid`), 653 | KEY `node_title_type` (`title`,`type`(4)), 654 | KEY `node_type` (`type`(4)), 655 | KEY `uid` (`uid`), 656 | KEY `tnid` (`tnid`), 657 | KEY `translate` (`translate`) 658 | ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; 659 | /*!40101 SET character_set_client = @saved_cs_client */; 660 | 661 | -- 662 | -- Table structure for table `node_access` 663 | -- 664 | 665 | DROP TABLE IF EXISTS `node_access`; 666 | /*!40101 SET @saved_cs_client = @@character_set_client */; 667 | /*!40101 SET character_set_client = utf8 */; 668 | CREATE TABLE `node_access` ( 669 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 670 | `gid` int(10) unsigned NOT NULL DEFAULT '0', 671 | `realm` varchar(255) NOT NULL DEFAULT '', 672 | `grant_view` tinyint(3) unsigned NOT NULL DEFAULT '0', 673 | `grant_update` tinyint(3) unsigned NOT NULL DEFAULT '0', 674 | `grant_delete` tinyint(3) unsigned NOT NULL DEFAULT '0', 675 | PRIMARY KEY (`nid`,`gid`,`realm`) 676 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 677 | /*!40101 SET character_set_client = @saved_cs_client */; 678 | 679 | -- 680 | -- Table structure for table `node_comment_statistics` 681 | -- 682 | 683 | DROP TABLE IF EXISTS `node_comment_statistics`; 684 | /*!40101 SET @saved_cs_client = @@character_set_client */; 685 | /*!40101 SET character_set_client = utf8 */; 686 | CREATE TABLE `node_comment_statistics` ( 687 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 688 | `last_comment_timestamp` int(11) NOT NULL DEFAULT '0', 689 | `last_comment_name` varchar(60) DEFAULT NULL, 690 | `last_comment_uid` int(11) NOT NULL DEFAULT '0', 691 | `comment_count` int(10) unsigned NOT NULL DEFAULT '0', 692 | PRIMARY KEY (`nid`), 693 | KEY `node_comment_timestamp` (`last_comment_timestamp`) 694 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 695 | /*!40101 SET character_set_client = @saved_cs_client */; 696 | 697 | -- 698 | -- Table structure for table `node_counter` 699 | -- 700 | 701 | DROP TABLE IF EXISTS `node_counter`; 702 | /*!40101 SET @saved_cs_client = @@character_set_client */; 703 | /*!40101 SET character_set_client = utf8 */; 704 | CREATE TABLE `node_counter` ( 705 | `nid` int(11) NOT NULL DEFAULT '0', 706 | `totalcount` bigint(20) unsigned NOT NULL DEFAULT '0', 707 | `daycount` mediumint(8) unsigned NOT NULL DEFAULT '0', 708 | `timestamp` int(10) unsigned NOT NULL DEFAULT '0', 709 | PRIMARY KEY (`nid`) 710 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 711 | /*!40101 SET character_set_client = @saved_cs_client */; 712 | 713 | -- 714 | -- Table structure for table `node_revisions` 715 | -- 716 | 717 | DROP TABLE IF EXISTS `node_revisions`; 718 | /*!40101 SET @saved_cs_client = @@character_set_client */; 719 | /*!40101 SET character_set_client = utf8 */; 720 | CREATE TABLE `node_revisions` ( 721 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 722 | `vid` int(10) unsigned NOT NULL AUTO_INCREMENT, 723 | `uid` int(11) NOT NULL DEFAULT '0', 724 | `title` varchar(255) NOT NULL DEFAULT '', 725 | `body` longtext NOT NULL, 726 | `teaser` longtext NOT NULL, 727 | `log` longtext NOT NULL, 728 | `timestamp` int(11) NOT NULL DEFAULT '0', 729 | `format` int(11) NOT NULL DEFAULT '0', 730 | PRIMARY KEY (`vid`), 731 | KEY `nid` (`nid`), 732 | KEY `uid` (`uid`) 733 | ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; 734 | /*!40101 SET character_set_client = @saved_cs_client */; 735 | 736 | -- 737 | -- Table structure for table `node_type` 738 | -- 739 | 740 | DROP TABLE IF EXISTS `node_type`; 741 | /*!40101 SET @saved_cs_client = @@character_set_client */; 742 | /*!40101 SET character_set_client = utf8 */; 743 | CREATE TABLE `node_type` ( 744 | `type` varchar(32) NOT NULL, 745 | `name` varchar(255) NOT NULL DEFAULT '', 746 | `module` varchar(255) NOT NULL, 747 | `description` mediumtext NOT NULL, 748 | `help` mediumtext NOT NULL, 749 | `has_title` tinyint(3) unsigned NOT NULL, 750 | `title_label` varchar(255) NOT NULL DEFAULT '', 751 | `has_body` tinyint(3) unsigned NOT NULL, 752 | `body_label` varchar(255) NOT NULL DEFAULT '', 753 | `min_word_count` smallint(5) unsigned NOT NULL, 754 | `custom` tinyint(4) NOT NULL DEFAULT '0', 755 | `modified` tinyint(4) NOT NULL DEFAULT '0', 756 | `locked` tinyint(4) NOT NULL DEFAULT '0', 757 | `orig_type` varchar(255) NOT NULL DEFAULT '', 758 | PRIMARY KEY (`type`) 759 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 760 | /*!40101 SET character_set_client = @saved_cs_client */; 761 | 762 | -- 763 | -- Table structure for table `openid_association` 764 | -- 765 | 766 | DROP TABLE IF EXISTS `openid_association`; 767 | /*!40101 SET @saved_cs_client = @@character_set_client */; 768 | /*!40101 SET character_set_client = utf8 */; 769 | CREATE TABLE `openid_association` ( 770 | `idp_endpoint_uri` varchar(255) DEFAULT NULL, 771 | `assoc_handle` varchar(255) NOT NULL, 772 | `assoc_type` varchar(32) DEFAULT NULL, 773 | `session_type` varchar(32) DEFAULT NULL, 774 | `mac_key` varchar(255) DEFAULT NULL, 775 | `created` int(11) NOT NULL DEFAULT '0', 776 | `expires_in` int(11) NOT NULL DEFAULT '0', 777 | PRIMARY KEY (`assoc_handle`) 778 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 779 | /*!40101 SET character_set_client = @saved_cs_client */; 780 | 781 | -- 782 | -- Table structure for table `permission` 783 | -- 784 | 785 | DROP TABLE IF EXISTS `permission`; 786 | /*!40101 SET @saved_cs_client = @@character_set_client */; 787 | /*!40101 SET character_set_client = utf8 */; 788 | CREATE TABLE `permission` ( 789 | `pid` int(11) NOT NULL AUTO_INCREMENT, 790 | `rid` int(10) unsigned NOT NULL DEFAULT '0', 791 | `perm` longtext, 792 | `tid` int(10) unsigned NOT NULL DEFAULT '0', 793 | PRIMARY KEY (`pid`), 794 | KEY `rid` (`rid`) 795 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 796 | /*!40101 SET character_set_client = @saved_cs_client */; 797 | 798 | -- 799 | -- Table structure for table `poll` 800 | -- 801 | 802 | DROP TABLE IF EXISTS `poll`; 803 | /*!40101 SET @saved_cs_client = @@character_set_client */; 804 | /*!40101 SET character_set_client = utf8 */; 805 | CREATE TABLE `poll` ( 806 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 807 | `runtime` int(11) NOT NULL DEFAULT '0', 808 | `active` int(10) unsigned NOT NULL DEFAULT '0', 809 | PRIMARY KEY (`nid`) 810 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 811 | /*!40101 SET character_set_client = @saved_cs_client */; 812 | 813 | -- 814 | -- Table structure for table `poll_choices` 815 | -- 816 | 817 | DROP TABLE IF EXISTS `poll_choices`; 818 | /*!40101 SET @saved_cs_client = @@character_set_client */; 819 | /*!40101 SET character_set_client = utf8 */; 820 | CREATE TABLE `poll_choices` ( 821 | `chid` int(10) unsigned NOT NULL AUTO_INCREMENT, 822 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 823 | `chtext` varchar(128) NOT NULL DEFAULT '', 824 | `chvotes` int(11) NOT NULL DEFAULT '0', 825 | `chorder` int(11) NOT NULL DEFAULT '0', 826 | PRIMARY KEY (`chid`), 827 | KEY `nid` (`nid`) 828 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 829 | /*!40101 SET character_set_client = @saved_cs_client */; 830 | 831 | -- 832 | -- Table structure for table `poll_votes` 833 | -- 834 | 835 | DROP TABLE IF EXISTS `poll_votes`; 836 | /*!40101 SET @saved_cs_client = @@character_set_client */; 837 | /*!40101 SET character_set_client = utf8 */; 838 | CREATE TABLE `poll_votes` ( 839 | `nid` int(10) unsigned NOT NULL, 840 | `uid` int(10) unsigned NOT NULL DEFAULT '0', 841 | `chorder` int(11) NOT NULL DEFAULT '-1', 842 | `hostname` varchar(128) NOT NULL DEFAULT '', 843 | PRIMARY KEY (`nid`,`uid`,`hostname`), 844 | KEY `hostname` (`hostname`), 845 | KEY `uid` (`uid`) 846 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 847 | /*!40101 SET character_set_client = @saved_cs_client */; 848 | 849 | -- 850 | -- Table structure for table `profile_fields` 851 | -- 852 | 853 | DROP TABLE IF EXISTS `profile_fields`; 854 | /*!40101 SET @saved_cs_client = @@character_set_client */; 855 | /*!40101 SET character_set_client = utf8 */; 856 | CREATE TABLE `profile_fields` ( 857 | `fid` int(11) NOT NULL AUTO_INCREMENT, 858 | `title` varchar(255) DEFAULT NULL, 859 | `name` varchar(128) NOT NULL DEFAULT '', 860 | `explanation` text, 861 | `category` varchar(255) DEFAULT NULL, 862 | `page` varchar(255) DEFAULT NULL, 863 | `type` varchar(128) DEFAULT NULL, 864 | `weight` tinyint(4) NOT NULL DEFAULT '0', 865 | `required` tinyint(4) NOT NULL DEFAULT '0', 866 | `register` tinyint(4) NOT NULL DEFAULT '0', 867 | `visibility` tinyint(4) NOT NULL DEFAULT '0', 868 | `autocomplete` tinyint(4) NOT NULL DEFAULT '0', 869 | `options` text, 870 | PRIMARY KEY (`fid`), 871 | UNIQUE KEY `name` (`name`), 872 | KEY `category` (`category`) 873 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 874 | /*!40101 SET character_set_client = @saved_cs_client */; 875 | 876 | -- 877 | -- Table structure for table `profile_values` 878 | -- 879 | 880 | DROP TABLE IF EXISTS `profile_values`; 881 | /*!40101 SET @saved_cs_client = @@character_set_client */; 882 | /*!40101 SET character_set_client = utf8 */; 883 | CREATE TABLE `profile_values` ( 884 | `fid` int(10) unsigned NOT NULL DEFAULT '0', 885 | `uid` int(10) unsigned NOT NULL DEFAULT '0', 886 | `value` text, 887 | PRIMARY KEY (`uid`,`fid`), 888 | KEY `fid` (`fid`) 889 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 890 | /*!40101 SET character_set_client = @saved_cs_client */; 891 | 892 | -- 893 | -- Table structure for table `role` 894 | -- 895 | 896 | DROP TABLE IF EXISTS `role`; 897 | /*!40101 SET @saved_cs_client = @@character_set_client */; 898 | /*!40101 SET character_set_client = utf8 */; 899 | CREATE TABLE `role` ( 900 | `rid` int(10) unsigned NOT NULL AUTO_INCREMENT, 901 | `name` varchar(64) NOT NULL DEFAULT '', 902 | PRIMARY KEY (`rid`), 903 | UNIQUE KEY `name` (`name`) 904 | ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 905 | /*!40101 SET character_set_client = @saved_cs_client */; 906 | 907 | -- 908 | -- Table structure for table `search_dataset` 909 | -- 910 | 911 | DROP TABLE IF EXISTS `search_dataset`; 912 | /*!40101 SET @saved_cs_client = @@character_set_client */; 913 | /*!40101 SET character_set_client = utf8 */; 914 | CREATE TABLE `search_dataset` ( 915 | `sid` int(10) unsigned NOT NULL DEFAULT '0', 916 | `type` varchar(16) DEFAULT NULL, 917 | `data` longtext NOT NULL, 918 | `reindex` int(10) unsigned NOT NULL DEFAULT '0', 919 | UNIQUE KEY `sid_type` (`sid`,`type`) 920 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 921 | /*!40101 SET character_set_client = @saved_cs_client */; 922 | 923 | -- 924 | -- Table structure for table `search_index` 925 | -- 926 | 927 | DROP TABLE IF EXISTS `search_index`; 928 | /*!40101 SET @saved_cs_client = @@character_set_client */; 929 | /*!40101 SET character_set_client = utf8 */; 930 | CREATE TABLE `search_index` ( 931 | `word` varchar(50) NOT NULL DEFAULT '', 932 | `sid` int(10) unsigned NOT NULL DEFAULT '0', 933 | `type` varchar(16) DEFAULT NULL, 934 | `score` float DEFAULT NULL, 935 | UNIQUE KEY `word_sid_type` (`word`,`sid`,`type`), 936 | KEY `sid_type` (`sid`,`type`), 937 | KEY `word` (`word`) 938 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 939 | /*!40101 SET character_set_client = @saved_cs_client */; 940 | 941 | -- 942 | -- Table structure for table `search_node_links` 943 | -- 944 | 945 | DROP TABLE IF EXISTS `search_node_links`; 946 | /*!40101 SET @saved_cs_client = @@character_set_client */; 947 | /*!40101 SET character_set_client = utf8 */; 948 | CREATE TABLE `search_node_links` ( 949 | `sid` int(10) unsigned NOT NULL DEFAULT '0', 950 | `type` varchar(16) NOT NULL DEFAULT '', 951 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 952 | `caption` longtext, 953 | PRIMARY KEY (`sid`,`type`,`nid`), 954 | KEY `nid` (`nid`) 955 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 956 | /*!40101 SET character_set_client = @saved_cs_client */; 957 | 958 | -- 959 | -- Table structure for table `search_total` 960 | -- 961 | 962 | DROP TABLE IF EXISTS `search_total`; 963 | /*!40101 SET @saved_cs_client = @@character_set_client */; 964 | /*!40101 SET character_set_client = utf8 */; 965 | CREATE TABLE `search_total` ( 966 | `word` varchar(50) NOT NULL DEFAULT '', 967 | `count` float DEFAULT NULL, 968 | PRIMARY KEY (`word`) 969 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 970 | /*!40101 SET character_set_client = @saved_cs_client */; 971 | 972 | -- 973 | -- Table structure for table `sessions` 974 | -- 975 | 976 | DROP TABLE IF EXISTS `sessions`; 977 | /*!40101 SET @saved_cs_client = @@character_set_client */; 978 | /*!40101 SET character_set_client = utf8 */; 979 | CREATE TABLE `sessions` ( 980 | `uid` int(10) unsigned NOT NULL, 981 | `sid` varchar(64) NOT NULL DEFAULT '', 982 | `hostname` varchar(128) NOT NULL DEFAULT '', 983 | `timestamp` int(11) NOT NULL DEFAULT '0', 984 | `cache` int(11) NOT NULL DEFAULT '0', 985 | `session` longtext, 986 | PRIMARY KEY (`sid`), 987 | KEY `timestamp` (`timestamp`), 988 | KEY `uid` (`uid`) 989 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 990 | /*!40101 SET character_set_client = @saved_cs_client */; 991 | 992 | -- 993 | -- Table structure for table `system` 994 | -- 995 | 996 | DROP TABLE IF EXISTS `system`; 997 | /*!40101 SET @saved_cs_client = @@character_set_client */; 998 | /*!40101 SET character_set_client = utf8 */; 999 | CREATE TABLE `system` ( 1000 | `filename` varchar(255) NOT NULL DEFAULT '', 1001 | `name` varchar(255) NOT NULL DEFAULT '', 1002 | `type` varchar(255) NOT NULL DEFAULT '', 1003 | `owner` varchar(255) NOT NULL DEFAULT '', 1004 | `status` int(11) NOT NULL DEFAULT '0', 1005 | `throttle` tinyint(4) NOT NULL DEFAULT '0', 1006 | `bootstrap` int(11) NOT NULL DEFAULT '0', 1007 | `schema_version` smallint(6) NOT NULL DEFAULT '-1', 1008 | `weight` int(11) NOT NULL DEFAULT '0', 1009 | `info` text, 1010 | PRIMARY KEY (`filename`), 1011 | KEY `modules` (`type`(12),`status`,`weight`,`filename`), 1012 | KEY `bootstrap` (`type`(12),`status`,`bootstrap`,`weight`,`filename`) 1013 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1014 | /*!40101 SET character_set_client = @saved_cs_client */; 1015 | 1016 | -- 1017 | -- Table structure for table `term_data` 1018 | -- 1019 | 1020 | DROP TABLE IF EXISTS `term_data`; 1021 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1022 | /*!40101 SET character_set_client = utf8 */; 1023 | CREATE TABLE `term_data` ( 1024 | `tid` int(10) unsigned NOT NULL AUTO_INCREMENT, 1025 | `vid` int(10) unsigned NOT NULL DEFAULT '0', 1026 | `name` varchar(255) NOT NULL DEFAULT '', 1027 | `description` longtext, 1028 | `weight` tinyint(4) NOT NULL DEFAULT '0', 1029 | PRIMARY KEY (`tid`), 1030 | KEY `taxonomy_tree` (`vid`,`weight`,`name`), 1031 | KEY `vid_name` (`vid`,`name`) 1032 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1033 | /*!40101 SET character_set_client = @saved_cs_client */; 1034 | 1035 | -- 1036 | -- Table structure for table `term_hierarchy` 1037 | -- 1038 | 1039 | DROP TABLE IF EXISTS `term_hierarchy`; 1040 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1041 | /*!40101 SET character_set_client = utf8 */; 1042 | CREATE TABLE `term_hierarchy` ( 1043 | `tid` int(10) unsigned NOT NULL DEFAULT '0', 1044 | `parent` int(10) unsigned NOT NULL DEFAULT '0', 1045 | PRIMARY KEY (`tid`,`parent`), 1046 | KEY `parent` (`parent`) 1047 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1048 | /*!40101 SET character_set_client = @saved_cs_client */; 1049 | 1050 | -- 1051 | -- Table structure for table `term_node` 1052 | -- 1053 | 1054 | DROP TABLE IF EXISTS `term_node`; 1055 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1056 | /*!40101 SET character_set_client = utf8 */; 1057 | CREATE TABLE `term_node` ( 1058 | `nid` int(10) unsigned NOT NULL DEFAULT '0', 1059 | `vid` int(10) unsigned NOT NULL DEFAULT '0', 1060 | `tid` int(10) unsigned NOT NULL DEFAULT '0', 1061 | PRIMARY KEY (`tid`,`vid`), 1062 | KEY `vid` (`vid`), 1063 | KEY `nid` (`nid`) 1064 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1065 | /*!40101 SET character_set_client = @saved_cs_client */; 1066 | 1067 | -- 1068 | -- Table structure for table `term_relation` 1069 | -- 1070 | 1071 | DROP TABLE IF EXISTS `term_relation`; 1072 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1073 | /*!40101 SET character_set_client = utf8 */; 1074 | CREATE TABLE `term_relation` ( 1075 | `trid` int(11) NOT NULL AUTO_INCREMENT, 1076 | `tid1` int(10) unsigned NOT NULL DEFAULT '0', 1077 | `tid2` int(10) unsigned NOT NULL DEFAULT '0', 1078 | PRIMARY KEY (`trid`), 1079 | UNIQUE KEY `tid1_tid2` (`tid1`,`tid2`), 1080 | KEY `tid2` (`tid2`) 1081 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1082 | /*!40101 SET character_set_client = @saved_cs_client */; 1083 | 1084 | -- 1085 | -- Table structure for table `term_synonym` 1086 | -- 1087 | 1088 | DROP TABLE IF EXISTS `term_synonym`; 1089 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1090 | /*!40101 SET character_set_client = utf8 */; 1091 | CREATE TABLE `term_synonym` ( 1092 | `tsid` int(11) NOT NULL AUTO_INCREMENT, 1093 | `tid` int(10) unsigned NOT NULL DEFAULT '0', 1094 | `name` varchar(255) NOT NULL DEFAULT '', 1095 | PRIMARY KEY (`tsid`), 1096 | KEY `tid` (`tid`), 1097 | KEY `name_tid` (`name`,`tid`) 1098 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1099 | /*!40101 SET character_set_client = @saved_cs_client */; 1100 | 1101 | -- 1102 | -- Table structure for table `url_alias` 1103 | -- 1104 | 1105 | DROP TABLE IF EXISTS `url_alias`; 1106 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1107 | /*!40101 SET character_set_client = utf8 */; 1108 | CREATE TABLE `url_alias` ( 1109 | `pid` int(10) unsigned NOT NULL AUTO_INCREMENT, 1110 | `src` varchar(128) NOT NULL DEFAULT '', 1111 | `dst` varchar(128) NOT NULL DEFAULT '', 1112 | `language` varchar(12) NOT NULL DEFAULT '', 1113 | PRIMARY KEY (`pid`), 1114 | UNIQUE KEY `dst_language` (`dst`,`language`), 1115 | KEY `src` (`src`) 1116 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1117 | /*!40101 SET character_set_client = @saved_cs_client */; 1118 | 1119 | -- 1120 | -- Table structure for table `users` 1121 | -- 1122 | 1123 | DROP TABLE IF EXISTS `users`; 1124 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1125 | /*!40101 SET character_set_client = utf8 */; 1126 | CREATE TABLE `users` ( 1127 | `uid` int(10) unsigned NOT NULL AUTO_INCREMENT, 1128 | `name` varchar(60) NOT NULL DEFAULT '', 1129 | `pass` varchar(32) NOT NULL DEFAULT '', 1130 | `mail` varchar(64) DEFAULT '', 1131 | `mode` tinyint(4) NOT NULL DEFAULT '0', 1132 | `sort` tinyint(4) DEFAULT '0', 1133 | `threshold` tinyint(4) DEFAULT '0', 1134 | `theme` varchar(255) NOT NULL DEFAULT '', 1135 | `signature` varchar(255) NOT NULL DEFAULT '', 1136 | `created` int(11) NOT NULL DEFAULT '0', 1137 | `access` int(11) NOT NULL DEFAULT '0', 1138 | `login` int(11) NOT NULL DEFAULT '0', 1139 | `status` tinyint(4) NOT NULL DEFAULT '0', 1140 | `timezone` varchar(8) DEFAULT NULL, 1141 | `language` varchar(12) NOT NULL DEFAULT '', 1142 | `picture` varchar(255) NOT NULL DEFAULT '', 1143 | `init` varchar(64) DEFAULT '', 1144 | `data` longtext, 1145 | PRIMARY KEY (`uid`), 1146 | UNIQUE KEY `name` (`name`), 1147 | KEY `access` (`access`), 1148 | KEY `created` (`created`), 1149 | KEY `mail` (`mail`) 1150 | ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; 1151 | /*!40101 SET character_set_client = @saved_cs_client */; 1152 | 1153 | -- 1154 | -- Table structure for table `users_roles` 1155 | -- 1156 | 1157 | DROP TABLE IF EXISTS `users_roles`; 1158 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1159 | /*!40101 SET character_set_client = utf8 */; 1160 | CREATE TABLE `users_roles` ( 1161 | `uid` int(10) unsigned NOT NULL DEFAULT '0', 1162 | `rid` int(10) unsigned NOT NULL DEFAULT '0', 1163 | PRIMARY KEY (`uid`,`rid`), 1164 | KEY `rid` (`rid`) 1165 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1166 | /*!40101 SET character_set_client = @saved_cs_client */; 1167 | 1168 | -- 1169 | -- Table structure for table `variable` 1170 | -- 1171 | 1172 | DROP TABLE IF EXISTS `variable`; 1173 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1174 | /*!40101 SET character_set_client = utf8 */; 1175 | CREATE TABLE `variable` ( 1176 | `name` varchar(128) NOT NULL DEFAULT '', 1177 | `value` longtext NOT NULL, 1178 | PRIMARY KEY (`name`) 1179 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1180 | /*!40101 SET character_set_client = @saved_cs_client */; 1181 | 1182 | -- 1183 | -- Table structure for table `vocabulary` 1184 | -- 1185 | 1186 | DROP TABLE IF EXISTS `vocabulary`; 1187 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1188 | /*!40101 SET character_set_client = utf8 */; 1189 | CREATE TABLE `vocabulary` ( 1190 | `vid` int(10) unsigned NOT NULL AUTO_INCREMENT, 1191 | `name` varchar(255) NOT NULL DEFAULT '', 1192 | `description` longtext, 1193 | `help` varchar(255) NOT NULL DEFAULT '', 1194 | `relations` tinyint(3) unsigned NOT NULL DEFAULT '0', 1195 | `hierarchy` tinyint(3) unsigned NOT NULL DEFAULT '0', 1196 | `multiple` tinyint(3) unsigned NOT NULL DEFAULT '0', 1197 | `required` tinyint(3) unsigned NOT NULL DEFAULT '0', 1198 | `tags` tinyint(3) unsigned NOT NULL DEFAULT '0', 1199 | `module` varchar(255) NOT NULL DEFAULT '', 1200 | `weight` tinyint(4) NOT NULL DEFAULT '0', 1201 | PRIMARY KEY (`vid`), 1202 | KEY `list` (`weight`,`name`) 1203 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1204 | /*!40101 SET character_set_client = @saved_cs_client */; 1205 | 1206 | -- 1207 | -- Table structure for table `vocabulary_node_types` 1208 | -- 1209 | 1210 | DROP TABLE IF EXISTS `vocabulary_node_types`; 1211 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1212 | /*!40101 SET character_set_client = utf8 */; 1213 | CREATE TABLE `vocabulary_node_types` ( 1214 | `vid` int(10) unsigned NOT NULL DEFAULT '0', 1215 | `type` varchar(32) NOT NULL DEFAULT '', 1216 | PRIMARY KEY (`type`,`vid`), 1217 | KEY `vid` (`vid`) 1218 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1219 | /*!40101 SET character_set_client = @saved_cs_client */; 1220 | 1221 | -- 1222 | -- Table structure for table `watchdog` 1223 | -- 1224 | 1225 | DROP TABLE IF EXISTS `watchdog`; 1226 | /*!40101 SET @saved_cs_client = @@character_set_client */; 1227 | /*!40101 SET character_set_client = utf8 */; 1228 | CREATE TABLE `watchdog` ( 1229 | `wid` int(11) NOT NULL AUTO_INCREMENT, 1230 | `uid` int(11) NOT NULL DEFAULT '0', 1231 | `type` varchar(16) NOT NULL DEFAULT '', 1232 | `message` longtext NOT NULL, 1233 | `variables` longtext NOT NULL, 1234 | `severity` tinyint(3) unsigned NOT NULL DEFAULT '0', 1235 | `link` varchar(255) NOT NULL DEFAULT '', 1236 | `location` text NOT NULL, 1237 | `referer` varchar(128) NOT NULL DEFAULT '', 1238 | `hostname` varchar(128) NOT NULL DEFAULT '', 1239 | `timestamp` int(11) NOT NULL DEFAULT '0', 1240 | PRIMARY KEY (`wid`), 1241 | KEY `type` (`type`) 1242 | ) ENGINE=MyISAM AUTO_INCREMENT=44 DEFAULT CHARSET=utf8; 1243 | /*!40101 SET character_set_client = @saved_cs_client */; 1244 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 1245 | 1246 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 1247 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 1248 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 1249 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 1250 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 1251 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 1252 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 1253 | 1254 | -- Dump completed on 2012-11-22 12:27:39 1255 | -------------------------------------------------------------------------------- /joomla.sql: -------------------------------------------------------------------------------- 1 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 2 | SET time_zone = "+00:00"; 3 | 4 | -- 5 | -- Database: `joomla` 6 | -- 7 | 8 | -- -------------------------------------------------------- 9 | 10 | -- 11 | -- Table structure for table `#__assets` 12 | -- 13 | 14 | CREATE TABLE IF NOT EXISTS `#__assets` ( 15 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', 16 | `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.', 17 | `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.', 18 | `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.', 19 | `level` int(10) unsigned NOT NULL COMMENT 'The cached level in the nested tree.', 20 | `name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n', 21 | `title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.', 22 | `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.', 23 | PRIMARY KEY (`id`), 24 | UNIQUE KEY `idx_asset_name` (`name`), 25 | KEY `idx_lft_rgt` (`lft`,`rgt`), 26 | KEY `idx_parent_id` (`parent_id`) 27 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ; 28 | 29 | -- 30 | -- Dumping data for table `#__assets` 31 | -- 32 | 33 | -- 34 | -- Table structure for table `#__associations` 35 | -- 36 | 37 | CREATE TABLE IF NOT EXISTS `#__associations` ( 38 | `id` varchar(50) NOT NULL COMMENT 'A reference to the associated item.', 39 | `context` varchar(50) NOT NULL COMMENT 'The context of the associated item.', 40 | `key` char(32) NOT NULL COMMENT 'The key for the association computed from an md5 on associated ids.', 41 | PRIMARY KEY (`context`,`id`), 42 | KEY `idx_key` (`key`) 43 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 44 | 45 | -- -------------------------------------------------------- 46 | 47 | -- 48 | -- Table structure for table `#__banners` 49 | -- 50 | 51 | CREATE TABLE IF NOT EXISTS `#__banners` ( 52 | `id` int(11) NOT NULL AUTO_INCREMENT, 53 | `cid` int(11) NOT NULL DEFAULT '0', 54 | `type` int(11) NOT NULL DEFAULT '0', 55 | `name` varchar(255) NOT NULL DEFAULT '', 56 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', 57 | `imptotal` int(11) NOT NULL DEFAULT '0', 58 | `impmade` int(11) NOT NULL DEFAULT '0', 59 | `clicks` int(11) NOT NULL DEFAULT '0', 60 | `clickurl` varchar(200) NOT NULL DEFAULT '', 61 | `state` tinyint(3) NOT NULL DEFAULT '0', 62 | `catid` int(10) unsigned NOT NULL DEFAULT '0', 63 | `description` text NOT NULL, 64 | `custombannercode` varchar(2048) NOT NULL, 65 | `sticky` tinyint(1) unsigned NOT NULL DEFAULT '0', 66 | `ordering` int(11) NOT NULL DEFAULT '0', 67 | `metakey` text NOT NULL, 68 | `params` text NOT NULL, 69 | `own_prefix` tinyint(1) NOT NULL DEFAULT '0', 70 | `metakey_prefix` varchar(255) NOT NULL DEFAULT '', 71 | `purchase_type` tinyint(4) NOT NULL DEFAULT '-1', 72 | `track_clicks` tinyint(4) NOT NULL DEFAULT '-1', 73 | `track_impressions` tinyint(4) NOT NULL DEFAULT '-1', 74 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 75 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 76 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 77 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 78 | `reset` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 79 | `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 80 | `language` char(7) NOT NULL DEFAULT '', 81 | `created_by` int(10) unsigned NOT NULL DEFAULT '0', 82 | `created_by_alias` varchar(255) NOT NULL DEFAULT '', 83 | `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 84 | `modified_by` int(10) unsigned NOT NULL DEFAULT '0', 85 | `version` int(10) unsigned NOT NULL DEFAULT '1', 86 | PRIMARY KEY (`id`), 87 | KEY `idx_state` (`state`), 88 | KEY `idx_own_prefix` (`own_prefix`), 89 | KEY `idx_metakey_prefix` (`metakey_prefix`), 90 | KEY `idx_banner_catid` (`catid`), 91 | KEY `idx_language` (`language`) 92 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 93 | 94 | -- -------------------------------------------------------- 95 | 96 | -- 97 | -- Table structure for table `#__banner_clients` 98 | -- 99 | 100 | CREATE TABLE IF NOT EXISTS `#__banner_clients` ( 101 | `id` int(11) NOT NULL AUTO_INCREMENT, 102 | `name` varchar(255) NOT NULL DEFAULT '', 103 | `contact` varchar(255) NOT NULL DEFAULT '', 104 | `email` varchar(255) NOT NULL DEFAULT '', 105 | `extrainfo` text NOT NULL, 106 | `state` tinyint(3) NOT NULL DEFAULT '0', 107 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 108 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 109 | `metakey` text NOT NULL, 110 | `own_prefix` tinyint(4) NOT NULL DEFAULT '0', 111 | `metakey_prefix` varchar(255) NOT NULL DEFAULT '', 112 | `purchase_type` tinyint(4) NOT NULL DEFAULT '-1', 113 | `track_clicks` tinyint(4) NOT NULL DEFAULT '-1', 114 | `track_impressions` tinyint(4) NOT NULL DEFAULT '-1', 115 | PRIMARY KEY (`id`), 116 | KEY `idx_own_prefix` (`own_prefix`), 117 | KEY `idx_metakey_prefix` (`metakey_prefix`) 118 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 119 | 120 | -- -------------------------------------------------------- 121 | 122 | -- 123 | -- Table structure for table `#__banner_tracks` 124 | -- 125 | 126 | CREATE TABLE IF NOT EXISTS `#__banner_tracks` ( 127 | `track_date` datetime NOT NULL, 128 | `track_type` int(10) unsigned NOT NULL, 129 | `banner_id` int(10) unsigned NOT NULL, 130 | `count` int(10) unsigned NOT NULL DEFAULT '0', 131 | PRIMARY KEY (`track_date`,`track_type`,`banner_id`), 132 | KEY `idx_track_date` (`track_date`), 133 | KEY `idx_track_type` (`track_type`), 134 | KEY `idx_banner_id` (`banner_id`) 135 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 136 | 137 | -- -------------------------------------------------------- 138 | 139 | -- 140 | -- Table structure for table `#__categories` 141 | -- 142 | 143 | CREATE TABLE IF NOT EXISTS `#__categories` ( 144 | `id` int(11) NOT NULL AUTO_INCREMENT, 145 | `asset_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.', 146 | `parent_id` int(10) unsigned NOT NULL DEFAULT '0', 147 | `lft` int(11) NOT NULL DEFAULT '0', 148 | `rgt` int(11) NOT NULL DEFAULT '0', 149 | `level` int(10) unsigned NOT NULL DEFAULT '0', 150 | `path` varchar(255) NOT NULL DEFAULT '', 151 | `extension` varchar(50) NOT NULL DEFAULT '', 152 | `title` varchar(255) NOT NULL, 153 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', 154 | `note` varchar(255) NOT NULL DEFAULT '', 155 | `description` mediumtext NOT NULL, 156 | `published` tinyint(1) NOT NULL DEFAULT '0', 157 | `checked_out` int(11) unsigned NOT NULL DEFAULT '0', 158 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 159 | `access` int(10) unsigned NOT NULL DEFAULT '0', 160 | `params` text NOT NULL, 161 | `metadesc` varchar(1024) NOT NULL COMMENT 'The meta description for the page.', 162 | `metakey` varchar(1024) NOT NULL COMMENT 'The meta keywords for the page.', 163 | `metadata` varchar(2048) NOT NULL COMMENT 'JSON encoded metadata properties.', 164 | `created_user_id` int(10) unsigned NOT NULL DEFAULT '0', 165 | `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 166 | `modified_user_id` int(10) unsigned NOT NULL DEFAULT '0', 167 | `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 168 | `hits` int(10) unsigned NOT NULL DEFAULT '0', 169 | `language` char(7) NOT NULL, 170 | `version` int(10) unsigned NOT NULL DEFAULT '1', 171 | PRIMARY KEY (`id`), 172 | KEY `cat_idx` (`extension`,`published`,`access`), 173 | KEY `idx_access` (`access`), 174 | KEY `idx_checkout` (`checked_out`), 175 | KEY `idx_path` (`path`), 176 | KEY `idx_left_right` (`lft`,`rgt`), 177 | KEY `idx_alias` (`alias`), 178 | KEY `idx_language` (`language`) 179 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; 180 | 181 | -- 182 | -- Dumping data for table `#__categories` 183 | -- 184 | 185 | -- -------------------------------------------------------- 186 | 187 | -- 188 | -- Table structure for table `#__contact_details` 189 | -- 190 | 191 | CREATE TABLE IF NOT EXISTS `#__contact_details` ( 192 | `id` int(11) NOT NULL AUTO_INCREMENT, 193 | `name` varchar(255) NOT NULL DEFAULT '', 194 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', 195 | `con_position` varchar(255) DEFAULT NULL, 196 | `address` text, 197 | `suburb` varchar(100) DEFAULT NULL, 198 | `state` varchar(100) DEFAULT NULL, 199 | `country` varchar(100) DEFAULT NULL, 200 | `postcode` varchar(100) DEFAULT NULL, 201 | `telephone` varchar(255) DEFAULT NULL, 202 | `fax` varchar(255) DEFAULT NULL, 203 | `misc` mediumtext, 204 | `image` varchar(255) DEFAULT NULL, 205 | `email_to` varchar(255) DEFAULT NULL, 206 | `default_con` tinyint(1) unsigned NOT NULL DEFAULT '0', 207 | `published` tinyint(1) NOT NULL DEFAULT '0', 208 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 209 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 210 | `ordering` int(11) NOT NULL DEFAULT '0', 211 | `params` text NOT NULL, 212 | `user_id` int(11) NOT NULL DEFAULT '0', 213 | `catid` int(11) NOT NULL DEFAULT '0', 214 | `access` int(10) unsigned NOT NULL DEFAULT '0', 215 | `mobile` varchar(255) NOT NULL DEFAULT '', 216 | `webpage` varchar(255) NOT NULL DEFAULT '', 217 | `sortname1` varchar(255) NOT NULL, 218 | `sortname2` varchar(255) NOT NULL, 219 | `sortname3` varchar(255) NOT NULL, 220 | `language` char(7) NOT NULL, 221 | `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 222 | `created_by` int(10) unsigned NOT NULL DEFAULT '0', 223 | `created_by_alias` varchar(255) NOT NULL DEFAULT '', 224 | `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 225 | `modified_by` int(10) unsigned NOT NULL DEFAULT '0', 226 | `metakey` text NOT NULL, 227 | `metadesc` text NOT NULL, 228 | `metadata` text NOT NULL, 229 | `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if article is featured.', 230 | `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.', 231 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 232 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 233 | `version` int(10) unsigned NOT NULL DEFAULT '1', 234 | `hits` int(10) unsigned NOT NULL DEFAULT '0', 235 | PRIMARY KEY (`id`), 236 | KEY `idx_access` (`access`), 237 | KEY `idx_checkout` (`checked_out`), 238 | KEY `idx_state` (`published`), 239 | KEY `idx_catid` (`catid`), 240 | KEY `idx_createdby` (`created_by`), 241 | KEY `idx_featured_catid` (`featured`,`catid`), 242 | KEY `idx_language` (`language`), 243 | KEY `idx_xreference` (`xreference`) 244 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 245 | 246 | -- -------------------------------------------------------- 247 | 248 | -- 249 | -- Table structure for table `#__content` 250 | -- 251 | 252 | CREATE TABLE IF NOT EXISTS `#__content` ( 253 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 254 | `asset_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.', 255 | `title` varchar(255) NOT NULL DEFAULT '', 256 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', 257 | `introtext` mediumtext NOT NULL, 258 | `fulltext` mediumtext NOT NULL, 259 | `state` tinyint(3) NOT NULL DEFAULT '0', 260 | `catid` int(10) unsigned NOT NULL DEFAULT '0', 261 | `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 262 | `created_by` int(10) unsigned NOT NULL DEFAULT '0', 263 | `created_by_alias` varchar(255) NOT NULL DEFAULT '', 264 | `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 265 | `modified_by` int(10) unsigned NOT NULL DEFAULT '0', 266 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 267 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 268 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 269 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 270 | `images` text NOT NULL, 271 | `urls` text NOT NULL, 272 | `attribs` varchar(5120) NOT NULL, 273 | `version` int(10) unsigned NOT NULL DEFAULT '1', 274 | `ordering` int(11) NOT NULL DEFAULT '0', 275 | `metakey` text NOT NULL, 276 | `metadesc` text NOT NULL, 277 | `access` int(10) unsigned NOT NULL DEFAULT '0', 278 | `hits` int(10) unsigned NOT NULL DEFAULT '0', 279 | `metadata` text NOT NULL, 280 | `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if article is featured.', 281 | `language` char(7) NOT NULL COMMENT 'The language code for the article.', 282 | `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.', 283 | PRIMARY KEY (`id`), 284 | KEY `idx_access` (`access`), 285 | KEY `idx_checkout` (`checked_out`), 286 | KEY `idx_state` (`state`), 287 | KEY `idx_catid` (`catid`), 288 | KEY `idx_createdby` (`created_by`), 289 | KEY `idx_featured_catid` (`featured`,`catid`), 290 | KEY `idx_language` (`language`), 291 | KEY `idx_xreference` (`xreference`) 292 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 293 | 294 | -- -------------------------------------------------------- 295 | 296 | -- 297 | -- Table structure for table `#__content_frontpage` 298 | -- 299 | 300 | CREATE TABLE IF NOT EXISTS `#__content_frontpage` ( 301 | `content_id` int(11) NOT NULL DEFAULT '0', 302 | `ordering` int(11) NOT NULL DEFAULT '0', 303 | PRIMARY KEY (`content_id`) 304 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 305 | 306 | -- -------------------------------------------------------- 307 | 308 | -- 309 | -- Table structure for table `#__content_rating` 310 | -- 311 | 312 | CREATE TABLE IF NOT EXISTS `#__content_rating` ( 313 | `content_id` int(11) NOT NULL DEFAULT '0', 314 | `rating_sum` int(10) unsigned NOT NULL DEFAULT '0', 315 | `rating_count` int(10) unsigned NOT NULL DEFAULT '0', 316 | `lastip` varchar(50) NOT NULL DEFAULT '', 317 | PRIMARY KEY (`content_id`) 318 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 319 | 320 | -- -------------------------------------------------------- 321 | 322 | -- 323 | -- Table structure for table `#__core_log_searches` 324 | -- 325 | 326 | CREATE TABLE IF NOT EXISTS `#__core_log_searches` ( 327 | `search_term` varchar(128) NOT NULL DEFAULT '', 328 | `hits` int(10) unsigned NOT NULL DEFAULT '0' 329 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 330 | 331 | -- -------------------------------------------------------- 332 | 333 | -- 334 | -- Table structure for table `#__extensions` 335 | -- 336 | 337 | CREATE TABLE IF NOT EXISTS `#__extensions` ( 338 | `extension_id` int(11) NOT NULL AUTO_INCREMENT, 339 | `name` varchar(100) NOT NULL, 340 | `type` varchar(20) NOT NULL, 341 | `element` varchar(100) NOT NULL, 342 | `folder` varchar(100) NOT NULL, 343 | `client_id` tinyint(3) NOT NULL, 344 | `enabled` tinyint(3) NOT NULL DEFAULT '1', 345 | `access` int(10) unsigned NOT NULL DEFAULT '1', 346 | `protected` tinyint(3) NOT NULL DEFAULT '0', 347 | `manifest_cache` text NOT NULL, 348 | `params` text NOT NULL, 349 | `custom_data` text NOT NULL, 350 | `system_data` text NOT NULL, 351 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 352 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 353 | `ordering` int(11) DEFAULT '0', 354 | `state` int(11) DEFAULT '0', 355 | PRIMARY KEY (`extension_id`), 356 | KEY `element_clientid` (`element`,`client_id`), 357 | KEY `element_folder_clientid` (`element`,`folder`,`client_id`), 358 | KEY `extension` (`type`,`element`,`folder`,`client_id`) 359 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10000 ; 360 | 361 | -- 362 | -- Dumping data for table `#__extensions` 363 | -- 364 | 365 | -- 366 | -- Table structure for table `#__finder_filters` 367 | -- 368 | 369 | CREATE TABLE IF NOT EXISTS `#__finder_filters` ( 370 | `filter_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 371 | `title` varchar(255) NOT NULL, 372 | `alias` varchar(255) NOT NULL, 373 | `state` tinyint(1) NOT NULL DEFAULT '1', 374 | `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 375 | `created_by` int(10) unsigned NOT NULL, 376 | `created_by_alias` varchar(255) NOT NULL, 377 | `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 378 | `modified_by` int(10) unsigned NOT NULL DEFAULT '0', 379 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 380 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 381 | `map_count` int(10) unsigned NOT NULL DEFAULT '0', 382 | `data` text NOT NULL, 383 | `params` mediumtext, 384 | PRIMARY KEY (`filter_id`) 385 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 386 | 387 | -- -------------------------------------------------------- 388 | 389 | -- 390 | -- Table structure for table `#__finder_links` 391 | -- 392 | 393 | CREATE TABLE IF NOT EXISTS `#__finder_links` ( 394 | `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 395 | `url` varchar(255) NOT NULL, 396 | `route` varchar(255) NOT NULL, 397 | `title` varchar(255) DEFAULT NULL, 398 | `description` varchar(255) DEFAULT NULL, 399 | `indexdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 400 | `md5sum` varchar(32) DEFAULT NULL, 401 | `published` tinyint(1) NOT NULL DEFAULT '1', 402 | `state` int(5) DEFAULT '1', 403 | `access` int(5) DEFAULT '0', 404 | `language` varchar(8) NOT NULL, 405 | `publish_start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 406 | `publish_end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 407 | `start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 408 | `end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 409 | `list_price` double unsigned NOT NULL DEFAULT '0', 410 | `sale_price` double unsigned NOT NULL DEFAULT '0', 411 | `type_id` int(11) NOT NULL, 412 | `object` mediumblob NOT NULL, 413 | PRIMARY KEY (`link_id`), 414 | KEY `idx_type` (`type_id`), 415 | KEY `idx_title` (`title`), 416 | KEY `idx_md5` (`md5sum`), 417 | KEY `idx_url` (`url`(75)), 418 | KEY `idx_published_list` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`list_price`), 419 | KEY `idx_published_sale` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`sale_price`) 420 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 421 | 422 | -- -------------------------------------------------------- 423 | 424 | -- 425 | -- Table structure for table `#__finder_links_terms0` 426 | -- 427 | 428 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms0` ( 429 | `link_id` int(10) unsigned NOT NULL, 430 | `term_id` int(10) unsigned NOT NULL, 431 | `weight` float unsigned NOT NULL, 432 | PRIMARY KEY (`link_id`,`term_id`), 433 | KEY `idx_term_weight` (`term_id`,`weight`), 434 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 435 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 436 | 437 | -- -------------------------------------------------------- 438 | 439 | -- 440 | -- Table structure for table `#__finder_links_terms1` 441 | -- 442 | 443 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms1` ( 444 | `link_id` int(10) unsigned NOT NULL, 445 | `term_id` int(10) unsigned NOT NULL, 446 | `weight` float unsigned NOT NULL, 447 | PRIMARY KEY (`link_id`,`term_id`), 448 | KEY `idx_term_weight` (`term_id`,`weight`), 449 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 450 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 451 | 452 | -- -------------------------------------------------------- 453 | 454 | -- 455 | -- Table structure for table `#__finder_links_terms2` 456 | -- 457 | 458 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms2` ( 459 | `link_id` int(10) unsigned NOT NULL, 460 | `term_id` int(10) unsigned NOT NULL, 461 | `weight` float unsigned NOT NULL, 462 | PRIMARY KEY (`link_id`,`term_id`), 463 | KEY `idx_term_weight` (`term_id`,`weight`), 464 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 465 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 466 | 467 | -- -------------------------------------------------------- 468 | 469 | -- 470 | -- Table structure for table `#__finder_links_terms3` 471 | -- 472 | 473 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms3` ( 474 | `link_id` int(10) unsigned NOT NULL, 475 | `term_id` int(10) unsigned NOT NULL, 476 | `weight` float unsigned NOT NULL, 477 | PRIMARY KEY (`link_id`,`term_id`), 478 | KEY `idx_term_weight` (`term_id`,`weight`), 479 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 480 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 481 | 482 | -- -------------------------------------------------------- 483 | 484 | -- 485 | -- Table structure for table `#__finder_links_terms4` 486 | -- 487 | 488 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms4` ( 489 | `link_id` int(10) unsigned NOT NULL, 490 | `term_id` int(10) unsigned NOT NULL, 491 | `weight` float unsigned NOT NULL, 492 | PRIMARY KEY (`link_id`,`term_id`), 493 | KEY `idx_term_weight` (`term_id`,`weight`), 494 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 495 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 496 | 497 | -- -------------------------------------------------------- 498 | 499 | -- 500 | -- Table structure for table `#__finder_links_terms5` 501 | -- 502 | 503 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms5` ( 504 | `link_id` int(10) unsigned NOT NULL, 505 | `term_id` int(10) unsigned NOT NULL, 506 | `weight` float unsigned NOT NULL, 507 | PRIMARY KEY (`link_id`,`term_id`), 508 | KEY `idx_term_weight` (`term_id`,`weight`), 509 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 510 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 511 | 512 | -- -------------------------------------------------------- 513 | 514 | -- 515 | -- Table structure for table `#__finder_links_terms6` 516 | -- 517 | 518 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms6` ( 519 | `link_id` int(10) unsigned NOT NULL, 520 | `term_id` int(10) unsigned NOT NULL, 521 | `weight` float unsigned NOT NULL, 522 | PRIMARY KEY (`link_id`,`term_id`), 523 | KEY `idx_term_weight` (`term_id`,`weight`), 524 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 525 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 526 | 527 | -- -------------------------------------------------------- 528 | 529 | -- 530 | -- Table structure for table `#__finder_links_terms7` 531 | -- 532 | 533 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms7` ( 534 | `link_id` int(10) unsigned NOT NULL, 535 | `term_id` int(10) unsigned NOT NULL, 536 | `weight` float unsigned NOT NULL, 537 | PRIMARY KEY (`link_id`,`term_id`), 538 | KEY `idx_term_weight` (`term_id`,`weight`), 539 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 540 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 541 | 542 | -- -------------------------------------------------------- 543 | 544 | -- 545 | -- Table structure for table `#__finder_links_terms8` 546 | -- 547 | 548 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms8` ( 549 | `link_id` int(10) unsigned NOT NULL, 550 | `term_id` int(10) unsigned NOT NULL, 551 | `weight` float unsigned NOT NULL, 552 | PRIMARY KEY (`link_id`,`term_id`), 553 | KEY `idx_term_weight` (`term_id`,`weight`), 554 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 555 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 556 | 557 | -- -------------------------------------------------------- 558 | 559 | -- 560 | -- Table structure for table `#__finder_links_terms9` 561 | -- 562 | 563 | CREATE TABLE IF NOT EXISTS `#__finder_links_terms9` ( 564 | `link_id` int(10) unsigned NOT NULL, 565 | `term_id` int(10) unsigned NOT NULL, 566 | `weight` float unsigned NOT NULL, 567 | PRIMARY KEY (`link_id`,`term_id`), 568 | KEY `idx_term_weight` (`term_id`,`weight`), 569 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 570 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 571 | 572 | -- -------------------------------------------------------- 573 | 574 | -- 575 | -- Table structure for table `#__finder_links_termsa` 576 | -- 577 | 578 | CREATE TABLE IF NOT EXISTS `#__finder_links_termsa` ( 579 | `link_id` int(10) unsigned NOT NULL, 580 | `term_id` int(10) unsigned NOT NULL, 581 | `weight` float unsigned NOT NULL, 582 | PRIMARY KEY (`link_id`,`term_id`), 583 | KEY `idx_term_weight` (`term_id`,`weight`), 584 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 585 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 586 | 587 | -- -------------------------------------------------------- 588 | 589 | -- 590 | -- Table structure for table `#__finder_links_termsb` 591 | -- 592 | 593 | CREATE TABLE IF NOT EXISTS `#__finder_links_termsb` ( 594 | `link_id` int(10) unsigned NOT NULL, 595 | `term_id` int(10) unsigned NOT NULL, 596 | `weight` float unsigned NOT NULL, 597 | PRIMARY KEY (`link_id`,`term_id`), 598 | KEY `idx_term_weight` (`term_id`,`weight`), 599 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 600 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 601 | 602 | -- -------------------------------------------------------- 603 | 604 | -- 605 | -- Table structure for table `#__finder_links_termsc` 606 | -- 607 | 608 | CREATE TABLE IF NOT EXISTS `#__finder_links_termsc` ( 609 | `link_id` int(10) unsigned NOT NULL, 610 | `term_id` int(10) unsigned NOT NULL, 611 | `weight` float unsigned NOT NULL, 612 | PRIMARY KEY (`link_id`,`term_id`), 613 | KEY `idx_term_weight` (`term_id`,`weight`), 614 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 615 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 616 | 617 | -- -------------------------------------------------------- 618 | 619 | -- 620 | -- Table structure for table `#__finder_links_termsd` 621 | -- 622 | 623 | CREATE TABLE IF NOT EXISTS `#__finder_links_termsd` ( 624 | `link_id` int(10) unsigned NOT NULL, 625 | `term_id` int(10) unsigned NOT NULL, 626 | `weight` float unsigned NOT NULL, 627 | PRIMARY KEY (`link_id`,`term_id`), 628 | KEY `idx_term_weight` (`term_id`,`weight`), 629 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 630 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 631 | 632 | -- -------------------------------------------------------- 633 | 634 | -- 635 | -- Table structure for table `#__finder_links_termse` 636 | -- 637 | 638 | CREATE TABLE IF NOT EXISTS `#__finder_links_termse` ( 639 | `link_id` int(10) unsigned NOT NULL, 640 | `term_id` int(10) unsigned NOT NULL, 641 | `weight` float unsigned NOT NULL, 642 | PRIMARY KEY (`link_id`,`term_id`), 643 | KEY `idx_term_weight` (`term_id`,`weight`), 644 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 645 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 646 | 647 | -- -------------------------------------------------------- 648 | 649 | -- 650 | -- Table structure for table `#__finder_links_termsf` 651 | -- 652 | 653 | CREATE TABLE IF NOT EXISTS `#__finder_links_termsf` ( 654 | `link_id` int(10) unsigned NOT NULL, 655 | `term_id` int(10) unsigned NOT NULL, 656 | `weight` float unsigned NOT NULL, 657 | PRIMARY KEY (`link_id`,`term_id`), 658 | KEY `idx_term_weight` (`term_id`,`weight`), 659 | KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`) 660 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 661 | 662 | -- -------------------------------------------------------- 663 | 664 | -- 665 | -- Table structure for table `#__finder_taxonomy` 666 | -- 667 | 668 | CREATE TABLE IF NOT EXISTS `#__finder_taxonomy` ( 669 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 670 | `parent_id` int(10) unsigned NOT NULL DEFAULT '0', 671 | `title` varchar(255) NOT NULL, 672 | `state` tinyint(1) unsigned NOT NULL DEFAULT '1', 673 | `access` tinyint(1) unsigned NOT NULL DEFAULT '0', 674 | `ordering` tinyint(1) unsigned NOT NULL DEFAULT '0', 675 | PRIMARY KEY (`id`), 676 | KEY `parent_id` (`parent_id`), 677 | KEY `state` (`state`), 678 | KEY `ordering` (`ordering`), 679 | KEY `access` (`access`), 680 | KEY `idx_parent_published` (`parent_id`,`state`,`access`) 681 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 682 | 683 | -- 684 | -- Dumping data for table `#__finder_taxonomy` 685 | -- 686 | 687 | -- -------------------------------------------------------- 688 | 689 | -- 690 | -- Table structure for table `#__finder_taxonomy_map` 691 | -- 692 | 693 | CREATE TABLE IF NOT EXISTS `#__finder_taxonomy_map` ( 694 | `link_id` int(10) unsigned NOT NULL, 695 | `node_id` int(10) unsigned NOT NULL, 696 | PRIMARY KEY (`link_id`,`node_id`), 697 | KEY `link_id` (`link_id`), 698 | KEY `node_id` (`node_id`) 699 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 700 | 701 | -- -------------------------------------------------------- 702 | 703 | -- 704 | -- Table structure for table `#__finder_terms` 705 | -- 706 | 707 | CREATE TABLE IF NOT EXISTS `#__finder_terms` ( 708 | `term_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 709 | `term` varchar(75) NOT NULL, 710 | `stem` varchar(75) NOT NULL, 711 | `common` tinyint(1) unsigned NOT NULL DEFAULT '0', 712 | `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0', 713 | `weight` float unsigned NOT NULL DEFAULT '0', 714 | `soundex` varchar(75) NOT NULL, 715 | `links` int(10) NOT NULL DEFAULT '0', 716 | `language` char(3) NOT NULL DEFAULT '', 717 | PRIMARY KEY (`term_id`), 718 | UNIQUE KEY `idx_term` (`term`), 719 | KEY `idx_term_phrase` (`term`,`phrase`), 720 | KEY `idx_stem_phrase` (`stem`,`phrase`), 721 | KEY `idx_soundex_phrase` (`soundex`,`phrase`) 722 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 723 | 724 | -- -------------------------------------------------------- 725 | 726 | -- 727 | -- Table structure for table `#__finder_terms_common` 728 | -- 729 | 730 | CREATE TABLE IF NOT EXISTS `#__finder_terms_common` ( 731 | `term` varchar(75) NOT NULL, 732 | `language` varchar(3) NOT NULL, 733 | KEY `idx_word_lang` (`term`,`language`), 734 | KEY `idx_lang` (`language`) 735 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 736 | 737 | -- 738 | -- Dumping data for table `#__finder_terms_common` 739 | -- 740 | 741 | -- -------------------------------------------------------- 742 | 743 | -- 744 | -- Table structure for table `#__finder_tokens` 745 | -- 746 | 747 | CREATE TABLE IF NOT EXISTS `#__finder_tokens` ( 748 | `term` varchar(75) NOT NULL, 749 | `stem` varchar(75) NOT NULL, 750 | `common` tinyint(1) unsigned NOT NULL DEFAULT '0', 751 | `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0', 752 | `weight` float unsigned NOT NULL DEFAULT '1', 753 | `context` tinyint(1) unsigned NOT NULL DEFAULT '2', 754 | `language` char(3) NOT NULL DEFAULT '', 755 | KEY `idx_word` (`term`), 756 | KEY `idx_context` (`context`) 757 | ) ENGINE=MEMORY DEFAULT CHARSET=utf8; 758 | 759 | -- -------------------------------------------------------- 760 | 761 | -- 762 | -- Table structure for table `#__finder_tokens_aggregate` 763 | -- 764 | 765 | CREATE TABLE IF NOT EXISTS `#__finder_tokens_aggregate` ( 766 | `term_id` int(10) unsigned NOT NULL, 767 | `map_suffix` char(1) NOT NULL, 768 | `term` varchar(75) NOT NULL, 769 | `stem` varchar(75) NOT NULL, 770 | `common` tinyint(1) unsigned NOT NULL DEFAULT '0', 771 | `phrase` tinyint(1) unsigned NOT NULL DEFAULT '0', 772 | `term_weight` float unsigned NOT NULL, 773 | `context` tinyint(1) unsigned NOT NULL DEFAULT '2', 774 | `context_weight` float unsigned NOT NULL, 775 | `total_weight` float unsigned NOT NULL, 776 | `language` char(3) NOT NULL DEFAULT '', 777 | KEY `token` (`term`), 778 | KEY `keyword_id` (`term_id`) 779 | ) ENGINE=MEMORY DEFAULT CHARSET=utf8; 780 | 781 | -- -------------------------------------------------------- 782 | 783 | -- 784 | -- Table structure for table `#__finder_types` 785 | -- 786 | 787 | CREATE TABLE IF NOT EXISTS `#__finder_types` ( 788 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 789 | `title` varchar(100) NOT NULL, 790 | `mime` varchar(100) NOT NULL, 791 | PRIMARY KEY (`id`), 792 | UNIQUE KEY `title` (`title`) 793 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 794 | 795 | -- -------------------------------------------------------- 796 | 797 | -- 798 | -- Table structure for table `#__languages` 799 | -- 800 | 801 | CREATE TABLE IF NOT EXISTS `#__languages` ( 802 | `lang_id` int(11) unsigned NOT NULL AUTO_INCREMENT, 803 | `lang_code` char(7) NOT NULL, 804 | `title` varchar(50) NOT NULL, 805 | `title_native` varchar(50) NOT NULL, 806 | `sef` varchar(50) NOT NULL, 807 | `image` varchar(50) NOT NULL, 808 | `description` varchar(512) NOT NULL, 809 | `metakey` text NOT NULL, 810 | `metadesc` text NOT NULL, 811 | `sitename` varchar(1024) NOT NULL DEFAULT '', 812 | `published` int(11) NOT NULL DEFAULT '0', 813 | `access` int(10) unsigned NOT NULL DEFAULT '0', 814 | `ordering` int(11) NOT NULL DEFAULT '0', 815 | PRIMARY KEY (`lang_id`), 816 | UNIQUE KEY `idx_sef` (`sef`), 817 | UNIQUE KEY `idx_image` (`image`), 818 | UNIQUE KEY `idx_langcode` (`lang_code`), 819 | KEY `idx_access` (`access`), 820 | KEY `idx_ordering` (`ordering`) 821 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 822 | 823 | -- 824 | -- Dumping data for table `#__languages` 825 | -- 826 | 827 | 828 | -- 829 | -- Table structure for table `#__menu` 830 | -- 831 | 832 | CREATE TABLE IF NOT EXISTS `#__menu` ( 833 | `id` int(11) NOT NULL AUTO_INCREMENT, 834 | `menutype` varchar(24) NOT NULL COMMENT 'The type of menu this item belongs to. FK to #__menu_types.menutype', 835 | `title` varchar(255) NOT NULL COMMENT 'The display title of the menu item.', 836 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The SEF alias of the menu item.', 837 | `note` varchar(255) NOT NULL DEFAULT '', 838 | `path` varchar(1024) NOT NULL COMMENT 'The computed path of the menu item based on the alias field.', 839 | `link` varchar(1024) NOT NULL COMMENT 'The actually link the menu item refers to.', 840 | `type` varchar(16) NOT NULL COMMENT 'The type of link: Component, URL, Alias, Separator', 841 | `published` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The published state of the menu link.', 842 | `parent_id` int(10) unsigned NOT NULL DEFAULT '1' COMMENT 'The parent menu item in the menu tree.', 843 | `level` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The relative level in the tree.', 844 | `component_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to #__extensions.id', 845 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'FK to #__users.id', 846 | `checked_out_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The time the menu item was checked out.', 847 | `browserNav` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'The click behaviour of the link.', 848 | `access` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The access level required to view the menu item.', 849 | `img` varchar(255) NOT NULL COMMENT 'The image of the menu item.', 850 | `template_style_id` int(10) unsigned NOT NULL DEFAULT '0', 851 | `params` text NOT NULL COMMENT 'JSON encoded data for the menu item.', 852 | `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.', 853 | `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.', 854 | `home` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Indicates if this menu item is the home or default page.', 855 | `language` char(7) NOT NULL DEFAULT '', 856 | `client_id` tinyint(4) NOT NULL DEFAULT '0', 857 | PRIMARY KEY (`id`), 858 | UNIQUE KEY `idx_client_id_parent_id_alias_language` (`client_id`,`parent_id`,`alias`,`language`), 859 | KEY `idx_componentid` (`component_id`,`menutype`,`published`,`access`), 860 | KEY `idx_menutype` (`menutype`), 861 | KEY `idx_left_right` (`lft`,`rgt`), 862 | KEY `idx_alias` (`alias`), 863 | KEY `idx_path` (`path`(255)), 864 | KEY `idx_language` (`language`) 865 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=102 ; 866 | 867 | -- 868 | -- Dumping data for table `#__menu` 869 | -- 870 | 871 | -- 872 | -- Table structure for table `#__menu_types` 873 | -- 874 | 875 | CREATE TABLE IF NOT EXISTS `#__menu_types` ( 876 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 877 | `menutype` varchar(24) NOT NULL, 878 | `title` varchar(48) NOT NULL, 879 | `description` varchar(255) NOT NULL DEFAULT '', 880 | PRIMARY KEY (`id`), 881 | UNIQUE KEY `idx_menutype` (`menutype`) 882 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 883 | 884 | -- 885 | -- Dumping data for table `#__menu_types` 886 | -- 887 | 888 | -- 889 | -- Table structure for table `#__messages` 890 | -- 891 | 892 | CREATE TABLE IF NOT EXISTS `#__messages` ( 893 | `message_id` int(10) unsigned NOT NULL AUTO_INCREMENT, 894 | `user_id_from` int(10) unsigned NOT NULL DEFAULT '0', 895 | `user_id_to` int(10) unsigned NOT NULL DEFAULT '0', 896 | `folder_id` tinyint(3) unsigned NOT NULL DEFAULT '0', 897 | `date_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 898 | `state` tinyint(1) NOT NULL DEFAULT '0', 899 | `priority` tinyint(1) unsigned NOT NULL DEFAULT '0', 900 | `subject` varchar(255) NOT NULL DEFAULT '', 901 | `message` text NOT NULL, 902 | PRIMARY KEY (`message_id`), 903 | KEY `useridto_state` (`user_id_to`,`state`) 904 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 905 | 906 | -- -------------------------------------------------------- 907 | 908 | -- 909 | -- Table structure for table `#__messages_cfg` 910 | -- 911 | 912 | CREATE TABLE IF NOT EXISTS `#__messages_cfg` ( 913 | `user_id` int(10) unsigned NOT NULL DEFAULT '0', 914 | `cfg_name` varchar(100) NOT NULL DEFAULT '', 915 | `cfg_value` varchar(255) NOT NULL DEFAULT '', 916 | UNIQUE KEY `idx_user_var_name` (`user_id`,`cfg_name`) 917 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 918 | 919 | -- -------------------------------------------------------- 920 | 921 | -- 922 | -- Table structure for table `#__modules` 923 | -- 924 | 925 | CREATE TABLE IF NOT EXISTS `#__modules` ( 926 | `id` int(11) NOT NULL AUTO_INCREMENT, 927 | `title` varchar(100) NOT NULL DEFAULT '', 928 | `note` varchar(255) NOT NULL DEFAULT '', 929 | `content` text NOT NULL, 930 | `ordering` int(11) NOT NULL DEFAULT '0', 931 | `position` varchar(50) NOT NULL DEFAULT '', 932 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 933 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 934 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 935 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 936 | `published` tinyint(1) NOT NULL DEFAULT '0', 937 | `module` varchar(50) DEFAULT NULL, 938 | `access` int(10) unsigned NOT NULL DEFAULT '0', 939 | `showtitle` tinyint(3) unsigned NOT NULL DEFAULT '1', 940 | `params` text NOT NULL, 941 | `client_id` tinyint(4) NOT NULL DEFAULT '0', 942 | `language` char(7) NOT NULL, 943 | PRIMARY KEY (`id`), 944 | KEY `published` (`published`,`access`), 945 | KEY `newsfeeds` (`module`,`published`), 946 | KEY `idx_language` (`language`) 947 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=87 ; 948 | 949 | -- 950 | -- Dumping data for table `#__modules` 951 | -- 952 | 953 | -- 954 | -- Table structure for table `#__modules_menu` 955 | -- 956 | 957 | CREATE TABLE IF NOT EXISTS `#__modules_menu` ( 958 | `moduleid` int(11) NOT NULL DEFAULT '0', 959 | `menuid` int(11) NOT NULL DEFAULT '0', 960 | PRIMARY KEY (`moduleid`,`menuid`) 961 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 962 | 963 | -- 964 | -- Dumping data for table `#__modules_menu` 965 | -- 966 | 967 | -- -------------------------------------------------------- 968 | 969 | -- 970 | -- Table structure for table `#__newsfeeds` 971 | -- 972 | CREATE TABLE IF NOT EXISTS `#__newsfeeds` ( 973 | `catid` int(11) NOT NULL DEFAULT '0', 974 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 975 | `name` varchar(100) NOT NULL DEFAULT '', 976 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', 977 | `link` varchar(200) NOT NULL DEFAULT '', 978 | `published` tinyint(1) NOT NULL DEFAULT '0', 979 | `numarticles` int(10) unsigned NOT NULL DEFAULT '1', 980 | `cache_time` int(10) unsigned NOT NULL DEFAULT '3600', 981 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 982 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 983 | `ordering` int(11) NOT NULL DEFAULT '0', 984 | `rtl` tinyint(4) NOT NULL DEFAULT '0', 985 | `access` int(10) unsigned NOT NULL DEFAULT '0', 986 | `language` char(7) NOT NULL DEFAULT '', 987 | `params` text NOT NULL, 988 | `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 989 | `created_by` int(10) unsigned NOT NULL DEFAULT '0', 990 | `created_by_alias` varchar(255) NOT NULL DEFAULT '', 991 | `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 992 | `modified_by` int(10) unsigned NOT NULL DEFAULT '0', 993 | `metakey` text NOT NULL, 994 | `metadesc` text NOT NULL, 995 | `metadata` text NOT NULL, 996 | `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.', 997 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 998 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 999 | `description` text NOT NULL, 1000 | `version` int(10) unsigned NOT NULL DEFAULT '1', 1001 | `hits` int(10) unsigned NOT NULL DEFAULT '0', 1002 | `images` text NOT NULL, 1003 | PRIMARY KEY (`id`), 1004 | KEY `idx_access` (`access`), 1005 | KEY `idx_checkout` (`checked_out`), 1006 | KEY `idx_state` (`published`), 1007 | KEY `idx_catid` (`catid`), 1008 | KEY `idx_createdby` (`created_by`), 1009 | KEY `idx_language` (`language`), 1010 | KEY `idx_xreference` (`xreference`) 1011 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1012 | 1013 | -- -------------------------------------------------------- 1014 | 1015 | -- 1016 | -- Table structure for table `#__overrider` 1017 | -- 1018 | 1019 | CREATE TABLE IF NOT EXISTS `#__overrider` ( 1020 | `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', 1021 | `constant` varchar(255) NOT NULL, 1022 | `string` text NOT NULL, 1023 | `file` varchar(255) NOT NULL, 1024 | PRIMARY KEY (`id`) 1025 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1026 | 1027 | -- -------------------------------------------------------- 1028 | 1029 | -- 1030 | -- Table structure for table `#__redirect_links` 1031 | -- 1032 | 1033 | CREATE TABLE IF NOT EXISTS `#__redirect_links` ( 1034 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 1035 | `old_url` varchar(255) NOT NULL, 1036 | `new_url` varchar(255) NOT NULL, 1037 | `referer` varchar(150) NOT NULL, 1038 | `comment` varchar(255) NOT NULL, 1039 | `hits` int(10) unsigned NOT NULL DEFAULT '0', 1040 | `published` tinyint(4) NOT NULL, 1041 | `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1042 | `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1043 | PRIMARY KEY (`id`), 1044 | UNIQUE KEY `idx_link_old` (`old_url`), 1045 | KEY `idx_link_modifed` (`modified_date`) 1046 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1047 | 1048 | -- -------------------------------------------------------- 1049 | 1050 | -- 1051 | -- Table structure for table `#__schemas` 1052 | -- 1053 | 1054 | CREATE TABLE IF NOT EXISTS `#__schemas` ( 1055 | `extension_id` int(11) NOT NULL, 1056 | `version_id` varchar(20) NOT NULL, 1057 | PRIMARY KEY (`extension_id`,`version_id`) 1058 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 1059 | 1060 | -- -------------------------------------------------------- 1061 | 1062 | -- 1063 | -- Table structure for table `#__session` 1064 | -- 1065 | 1066 | CREATE TABLE IF NOT EXISTS `#__session` ( 1067 | `session_id` varchar(200) NOT NULL DEFAULT '', 1068 | `client_id` tinyint(3) unsigned NOT NULL DEFAULT '0', 1069 | `guest` tinyint(4) unsigned DEFAULT '1', 1070 | `time` varchar(14) DEFAULT '', 1071 | `data` mediumtext, 1072 | `userid` int(11) DEFAULT '0', 1073 | `username` varchar(150) DEFAULT '', 1074 | PRIMARY KEY (`session_id`), 1075 | KEY `userid` (`userid`), 1076 | KEY `time` (`time`) 1077 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 1078 | 1079 | -- -------------------------------------------------------- 1080 | 1081 | -- 1082 | -- Table structure for table `#__template_styles` 1083 | -- 1084 | 1085 | CREATE TABLE IF NOT EXISTS `#__template_styles` ( 1086 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 1087 | `template` varchar(50) NOT NULL DEFAULT '', 1088 | `client_id` tinyint(1) unsigned NOT NULL DEFAULT '0', 1089 | `home` char(7) NOT NULL DEFAULT '0', 1090 | `title` varchar(255) NOT NULL DEFAULT '', 1091 | `params` text NOT NULL, 1092 | PRIMARY KEY (`id`), 1093 | KEY `idx_template` (`template`), 1094 | KEY `idx_home` (`home`) 1095 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; 1096 | 1097 | -- 1098 | -- Dumping data for table `#__template_styles` 1099 | -- 1100 | 1101 | 1102 | -- 1103 | -- Table structure for table `#__updates` 1104 | -- 1105 | 1106 | CREATE TABLE IF NOT EXISTS `#__updates` ( 1107 | `update_id` int(11) NOT NULL AUTO_INCREMENT, 1108 | `update_site_id` int(11) DEFAULT '0', 1109 | `extension_id` int(11) DEFAULT '0', 1110 | `name` varchar(100) DEFAULT '', 1111 | `description` text NOT NULL, 1112 | `element` varchar(100) DEFAULT '', 1113 | `type` varchar(20) DEFAULT '', 1114 | `folder` varchar(20) DEFAULT '', 1115 | `client_id` tinyint(3) DEFAULT '0', 1116 | `version` varchar(10) DEFAULT '', 1117 | `data` text NOT NULL, 1118 | `detailsurl` text NOT NULL, 1119 | `infourl` text NOT NULL, 1120 | PRIMARY KEY (`update_id`) 1121 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Available Updates' AUTO_INCREMENT=1 ; 1122 | 1123 | -- -------------------------------------------------------- 1124 | 1125 | -- 1126 | -- Table structure for table `#__update_sites` 1127 | -- 1128 | 1129 | CREATE TABLE IF NOT EXISTS `#__update_sites` ( 1130 | `update_site_id` int(11) NOT NULL AUTO_INCREMENT, 1131 | `name` varchar(100) DEFAULT '', 1132 | `type` varchar(20) DEFAULT '', 1133 | `location` text NOT NULL, 1134 | `enabled` int(11) DEFAULT '0', 1135 | `last_check_timestamp` bigint(20) DEFAULT '0', 1136 | PRIMARY KEY (`update_site_id`) 1137 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Update Sites' AUTO_INCREMENT=3 ; 1138 | 1139 | -- 1140 | -- Dumping data for table `#__update_sites` 1141 | -- 1142 | 1143 | -- 1144 | -- Table structure for table `#__update_sites_extensions` 1145 | -- 1146 | 1147 | CREATE TABLE IF NOT EXISTS `#__update_sites_extensions` ( 1148 | `update_site_id` int(11) NOT NULL DEFAULT '0', 1149 | `extension_id` int(11) NOT NULL DEFAULT '0', 1150 | PRIMARY KEY (`update_site_id`,`extension_id`) 1151 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Links extensions to update sites'; 1152 | 1153 | -- 1154 | -- Dumping data for table `#__update_sites_extensions` 1155 | -- 1156 | 1157 | 1158 | -- 1159 | -- Table structure for table `#__usergroups` 1160 | -- 1161 | 1162 | CREATE TABLE IF NOT EXISTS `#__usergroups` ( 1163 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', 1164 | `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Adjacency List Reference Id', 1165 | `lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.', 1166 | `rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.', 1167 | `title` varchar(100) NOT NULL DEFAULT '', 1168 | PRIMARY KEY (`id`), 1169 | UNIQUE KEY `idx_usergroup_parent_title_lookup` (`parent_id`,`title`), 1170 | KEY `idx_usergroup_title_lookup` (`title`), 1171 | KEY `idx_usergroup_adjacency_lookup` (`parent_id`), 1172 | KEY `idx_usergroup_nested_set_lookup` (`lft`,`rgt`) USING BTREE 1173 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; 1174 | 1175 | -- 1176 | -- Dumping data for table `#__usergroups` 1177 | -- 1178 | 1179 | -- 1180 | -- Table structure for table `#__users` 1181 | -- 1182 | 1183 | CREATE TABLE IF NOT EXISTS `#__users` ( 1184 | `id` int(11) NOT NULL AUTO_INCREMENT, 1185 | `name` varchar(255) NOT NULL DEFAULT '', 1186 | `username` varchar(150) NOT NULL DEFAULT '', 1187 | `email` varchar(100) NOT NULL DEFAULT '', 1188 | `password` varchar(100) NOT NULL DEFAULT '', 1189 | `block` tinyint(4) NOT NULL DEFAULT '0', 1190 | `sendEmail` tinyint(4) DEFAULT '0', 1191 | `registerDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1192 | `lastvisitDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1193 | `activation` varchar(100) NOT NULL DEFAULT '', 1194 | `params` text NOT NULL, 1195 | `lastResetTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date of last password reset', 1196 | `resetCount` int(11) NOT NULL DEFAULT '0' COMMENT 'Count of password resets since lastResetTime', 1197 | PRIMARY KEY (`id`), 1198 | KEY `idx_name` (`name`), 1199 | KEY `idx_block` (`block`), 1200 | KEY `username` (`username`), 1201 | KEY `email` (`email`) 1202 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1203 | 1204 | -- -------------------------------------------------------- 1205 | 1206 | -- 1207 | -- Table structure for table `#__user_notes` 1208 | -- 1209 | 1210 | CREATE TABLE IF NOT EXISTS `#__user_notes` ( 1211 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 1212 | `user_id` int(10) unsigned NOT NULL DEFAULT '0', 1213 | `catid` int(10) unsigned NOT NULL DEFAULT '0', 1214 | `subject` varchar(100) NOT NULL DEFAULT '', 1215 | `body` text NOT NULL, 1216 | `state` tinyint(3) NOT NULL DEFAULT '0', 1217 | `checked_out` int(10) unsigned NOT NULL DEFAULT '0', 1218 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1219 | `created_user_id` int(10) unsigned NOT NULL DEFAULT '0', 1220 | `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1221 | `modified_user_id` int(10) unsigned NOT NULL, 1222 | `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1223 | `review_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1224 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1225 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1226 | PRIMARY KEY (`id`), 1227 | KEY `idx_user_id` (`user_id`), 1228 | KEY `idx_category_id` (`catid`) 1229 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1230 | 1231 | -- -------------------------------------------------------- 1232 | 1233 | -- 1234 | -- Table structure for table `#__user_profiles` 1235 | -- 1236 | 1237 | CREATE TABLE IF NOT EXISTS `#__user_profiles` ( 1238 | `user_id` int(11) NOT NULL, 1239 | `profile_key` varchar(100) NOT NULL, 1240 | `profile_value` varchar(255) NOT NULL, 1241 | `ordering` int(11) NOT NULL DEFAULT '0', 1242 | UNIQUE KEY `idx_user_id_profile_key` (`user_id`,`profile_key`) 1243 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Simple user profile storage table'; 1244 | 1245 | -- -------------------------------------------------------- 1246 | 1247 | -- 1248 | -- Table structure for table `#__user_usergroup_map` 1249 | -- 1250 | 1251 | CREATE TABLE IF NOT EXISTS `#__user_usergroup_map` ( 1252 | `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #__users.id', 1253 | `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign Key to #__usergroups.id', 1254 | PRIMARY KEY (`user_id`,`group_id`) 1255 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 1256 | 1257 | -- -------------------------------------------------------- 1258 | 1259 | -- 1260 | -- Table structure for table `#__viewlevels` 1261 | -- 1262 | 1263 | CREATE TABLE IF NOT EXISTS `#__viewlevels` ( 1264 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', 1265 | `title` varchar(100) NOT NULL DEFAULT '', 1266 | `ordering` int(11) NOT NULL DEFAULT '0', 1267 | `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.', 1268 | PRIMARY KEY (`id`), 1269 | UNIQUE KEY `idx_assetgroup_title_lookup` (`title`) 1270 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; 1271 | 1272 | -- 1273 | -- Dumping data for table `#__viewlevels` 1274 | -- 1275 | 1276 | -- 1277 | -- Table structure for table `#__weblinks` 1278 | -- 1279 | 1280 | CREATE TABLE IF NOT EXISTS `#__weblinks` ( 1281 | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 1282 | `catid` int(11) NOT NULL DEFAULT '0', 1283 | `title` varchar(250) NOT NULL DEFAULT '', 1284 | `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', 1285 | `url` varchar(250) NOT NULL DEFAULT '', 1286 | `description` text NOT NULL, 1287 | `hits` int(11) NOT NULL DEFAULT '0', 1288 | `state` tinyint(1) NOT NULL DEFAULT '0', 1289 | `checked_out` int(11) NOT NULL DEFAULT '0', 1290 | `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1291 | `ordering` int(11) NOT NULL DEFAULT '0', 1292 | `access` int(11) NOT NULL DEFAULT '1', 1293 | `params` text NOT NULL, 1294 | `language` char(7) NOT NULL DEFAULT '', 1295 | `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1296 | `created_by` int(10) unsigned NOT NULL DEFAULT '0', 1297 | `created_by_alias` varchar(255) NOT NULL DEFAULT '', 1298 | `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1299 | `modified_by` int(10) unsigned NOT NULL DEFAULT '0', 1300 | `metakey` text NOT NULL, 1301 | `metadesc` text NOT NULL, 1302 | `metadata` text NOT NULL, 1303 | `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if link is featured.', 1304 | `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.', 1305 | `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1306 | `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1307 | `version` int(10) unsigned NOT NULL DEFAULT '1', 1308 | `images` text NOT NULL, 1309 | PRIMARY KEY (`id`), 1310 | KEY `idx_access` (`access`), 1311 | KEY `idx_checkout` (`checked_out`), 1312 | KEY `idx_state` (`state`), 1313 | KEY `idx_catid` (`catid`), 1314 | KEY `idx_createdby` (`created_by`), 1315 | KEY `idx_featured_catid` (`featured`,`catid`), 1316 | KEY `idx_language` (`language`), 1317 | KEY `idx_xreference` (`xreference`) 1318 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1319 | --------------------------------------------------------------------------------