* modifications related to enabling memcache and adding some expire headers
[vsc.git] / _res / schema.sql
blob24700df7556b90de6cf4e5ae06a57052d499dcec
1 -- phpMyAdmin SQL Dump
2 -- version 2.11.4
3 -- http://www.phpmyadmin.net
4 --
5 -- Host: localhost
6 -- Generation Time: Apr 25, 2008 at 11:17 PM
7 -- Server version: 5.0.56
8 -- PHP Version: 5.2.6RC4-pl0-gentoo
11 -- Database: `b`
14 -- --------------------------------------------------------
17 -- Table structure for table `categories`
20 CREATE TABLE IF NOT EXISTS `categories` (
21   `category_id` tinyint(4) NOT NULL auto_increment,
22   `category_parent` int(11) default NULL,
23   `category_name` varchar(255) NOT NULL,
24   `category_description` tinytext NOT NULL,
25   `category_active` enum('Y','N') NOT NULL default 'Y',
26   `category_private` enum('Y','N') NOT NULL default 'N',
27   PRIMARY KEY  (`category_id`),
28   KEY `category_parent` (`category_parent`)
29 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
32 -- Dumping data for table `categories`
35 INSERT INTO `categories` (`category_id`, `category_parent`, `category_name`, `category_description`, `category_active`, `category_private`) VALUES
36 (1, NULL, 'about : tests', '', 'Y', 'N');
38 -- --------------------------------------------------------
41 -- Table structure for table `categories_posts`
44 CREATE TABLE IF NOT EXISTS "categories_posts" (
45   "cp_id" int(11) NOT NULL auto_increment,
46   "category_id" tinyint(4) NOT NULL,
47   "post_id" int(11) NOT NULL,
48   PRIMARY KEY  ("cp_id"),
49   UNIQUE KEY "unique_cat_post" ("category_id","post_id")
52 -- --------------------------------------------------------
55 -- Table structure for table `groups`
58 CREATE TABLE IF NOT EXISTS "groups" (
59   "group_id" tinyint(4) NOT NULL auto_increment,
60   "group_name" varchar(50) NOT NULL,
61   PRIMARY KEY  ("group_id")
62 ) AUTO_INCREMENT=3 ;
65 -- Dumping data for table `groups`
68 INSERT INTO `groups` (`group_id`, `group_name`) VALUES
69 (1, 'root'),
70 (2, 'guest');
72 -- --------------------------------------------------------
75 -- Table structure for table `groups_roles`
78 CREATE TABLE IF NOT EXISTS "groups_roles" (
79   "gr_id" tinyint(4) NOT NULL auto_increment,
80   "group_id" tinyint(4) NOT NULL,
81   "role_id" tinyint(4) NOT NULL,
82   PRIMARY KEY  ("gr_id"),
83   UNIQUE KEY "group_id" ("group_id","role_id")
84 ) AUTO_INCREMENT=3 ;
87 -- Dumping data for table `groups_roles`
90 INSERT INTO `groups_roles` (`gr_id`, `group_id`, `role_id`) VALUES
91 (1, 1, 1),
92 (2, 1, 2);
94 -- --------------------------------------------------------
97 -- Table structure for table `options`
100 CREATE TABLE IF NOT EXISTS `options` (
101   `option_id` tinyint(4) NOT NULL auto_increment,
102   `option_name` varchar(12) NOT NULL,
103   `option_value` varchar(255) NOT NULL,
104   `option_modif` enum('Y','N') default 'N',
105   PRIMARY KEY  (`option_id`),
106   UNIQUE KEY `option_name` (`option_name`)
107 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
110 -- Dumping data for table `options`
113 INSERT INTO `options` (`option_id`, `option_name`, `option_value`, `option_modif`) VALUES
114 (1, 'title', 'empty spaces ...', 'Y'),
115 (2, 'start', '2008-01-20', 'N');
117 -- --------------------------------------------------------
120 -- Table structure for table `posts`
123 CREATE TABLE IF NOT EXISTS `posts` (
124   `post_id` int(10) NOT NULL auto_increment,
125   `post_parent` INT(10) NULL DEFAULT NULL,
126   `post_time` timestamp NOT NULL default CURRENT_TIMESTAMP,
127   `post_title` varchar(250) collate utf8_unicode_ci NOT NULL,
128   `post_author` int(11) NOT NULL,
129   `post_body` text collate utf8_unicode_ci NOT NULL,
130   `post_active` enum('Y','N') collate utf8_unicode_ci default 'Y',
131   `post_private` enum('Y','N') collate utf8_unicode_ci NOT NULL default 'N',
132   PRIMARY KEY  (`post_id`),
133   KEY `post_time` (`post_time`),
134   KEY `post_flags` (`post_private`),
135   KEY `post_author` (`post_author`),
136   FULLTEXT KEY `post_body` (`post_body`)
137 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
139 -- --------------------------------------------------------
142 -- Table structure for table `roles`
145 CREATE TABLE IF NOT EXISTS "roles" (
146   "role_id" tinyint(4) NOT NULL auto_increment,
147   "role_name" varchar(50) NOT NULL,
148   PRIMARY KEY  ("role_id")
149 ) AUTO_INCREMENT=3 ;
152 -- Dumping data for table `roles`
155 INSERT INTO `roles` (`role_id`, `role_name`) VALUES
156 (1, 'all'),
157 (2, 'nothing');
159 -- --------------------------------------------------------
162 -- Table structure for table `users`
165 CREATE TABLE IF NOT EXISTS "users" (
166   "user_id" int(11) NOT NULL auto_increment,
167   "user_name" varchar(16) NOT NULL,
168   "user_email" varchar(50) NOT NULL,
169   "user_credentials" varchar(32) NOT NULL,
170   PRIMARY KEY  ("user_id")
171 ) AUTO_INCREMENT=2 ;
174 -- Dumping data for table `users`
177 INSERT INTO `users` (`user_id`, `user_name`, `user_email`, `user_credentials`) VALUES
178 (1, 'habarnam', 'hab@habarnam.ro', '83b35b5d298c51c9b43f533847363c26');
180 -- --------------------------------------------------------
183 -- Table structure for table `users_groups`
186 CREATE TABLE IF NOT EXISTS "users_groups" (
187   "ug_id" int(11) NOT NULL auto_increment,
188   "user_id" int(11) NOT NULL,
189   "group_id" tinyint(4) NOT NULL,
190   PRIMARY KEY  ("ug_id"),
191   UNIQUE KEY "user_group" ("user_id","group_id")
192 ) AUTO_INCREMENT=2 ;
195 -- Dumping data for table `users_groups`
198 INSERT INTO `users_groups` (`ug_id`, `user_id`, `group_id`) VALUES
199 (1, 1, 1);