-- phpMyAdmin SQL Dump
-- version 2.10.2
-- http://www.phpmyadmin.net
-- 
-- 主机: localhost
-- 生成日期: 2010 年 01 月 20 日 01:50
-- 服务器版本: 5.0.45
-- PHP 版本: 5.2.3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- 
-- 数据库: `cakecms3`
-- 

-- --------------------------------------------------------

-- 
-- 表的结构 `acos`
-- 

CREATE TABLE `acos` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `parent_id` int(10) default NULL,
  `model` varchar(255) collate utf8_unicode_ci default NULL,
  `foreign_key` int(10) unsigned default NULL,
  `alias` varchar(255) collate utf8_unicode_ci default NULL,
  `lft` int(10) default NULL,
  `rght` int(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=70 ;

-- 
-- 导出表中的数据 `acos`
-- 

INSERT INTO `acos` VALUES (1, NULL, NULL, NULL, 'controllers', 1, 138);
INSERT INTO `acos` VALUES (2, 1, NULL, NULL, 'Pages', 2, 27);
INSERT INTO `acos` VALUES (3, 2, NULL, NULL, 'display', 3, 4);
INSERT INTO `acos` VALUES (4, 2, NULL, NULL, 'actionCase', 5, 6);
INSERT INTO `acos` VALUES (5, 2, NULL, NULL, 'admin_actionCase', 7, 8);
INSERT INTO `acos` VALUES (6, 2, NULL, NULL, 'reverse', 9, 10);
INSERT INTO `acos` VALUES (7, 2, NULL, NULL, 'admin_reverse', 11, 12);
INSERT INTO `acos` VALUES (8, 2, NULL, NULL, 'priority', 13, 14);
INSERT INTO `acos` VALUES (9, 2, NULL, NULL, 'admin_priority', 15, 16);
INSERT INTO `acos` VALUES (10, 2, NULL, NULL, 'add', 17, 18);
INSERT INTO `acos` VALUES (11, 2, NULL, NULL, 'edit', 19, 20);
INSERT INTO `acos` VALUES (12, 2, NULL, NULL, 'index', 21, 22);
INSERT INTO `acos` VALUES (13, 2, NULL, NULL, 'view', 23, 24);
INSERT INTO `acos` VALUES (14, 2, NULL, NULL, 'delete', 25, 26);
INSERT INTO `acos` VALUES (15, 1, NULL, NULL, 'Categories', 28, 51);
INSERT INTO `acos` VALUES (16, 15, NULL, NULL, 'index', 29, 30);
INSERT INTO `acos` VALUES (17, 15, NULL, NULL, 'view', 31, 32);
INSERT INTO `acos` VALUES (18, 15, NULL, NULL, 'add', 33, 34);
INSERT INTO `acos` VALUES (19, 15, NULL, NULL, 'edit', 35, 36);
INSERT INTO `acos` VALUES (20, 15, NULL, NULL, 'delete', 37, 38);
INSERT INTO `acos` VALUES (21, 15, NULL, NULL, 'actionCase', 39, 40);
INSERT INTO `acos` VALUES (22, 15, NULL, NULL, 'admin_actionCase', 41, 42);
INSERT INTO `acos` VALUES (23, 15, NULL, NULL, 'reverse', 43, 44);
INSERT INTO `acos` VALUES (24, 15, NULL, NULL, 'admin_reverse', 45, 46);
INSERT INTO `acos` VALUES (25, 15, NULL, NULL, 'priority', 47, 48);
INSERT INTO `acos` VALUES (26, 15, NULL, NULL, 'admin_priority', 49, 50);
INSERT INTO `acos` VALUES (27, 1, NULL, NULL, 'Groups', 52, 75);
INSERT INTO `acos` VALUES (28, 27, NULL, NULL, 'index', 53, 54);
INSERT INTO `acos` VALUES (29, 27, NULL, NULL, 'view', 55, 56);
INSERT INTO `acos` VALUES (30, 27, NULL, NULL, 'add', 57, 58);
INSERT INTO `acos` VALUES (31, 27, NULL, NULL, 'edit', 59, 60);
INSERT INTO `acos` VALUES (32, 27, NULL, NULL, 'delete', 61, 62);
INSERT INTO `acos` VALUES (33, 27, NULL, NULL, 'actionCase', 63, 64);
INSERT INTO `acos` VALUES (34, 27, NULL, NULL, 'admin_actionCase', 65, 66);
INSERT INTO `acos` VALUES (35, 27, NULL, NULL, 'reverse', 67, 68);
INSERT INTO `acos` VALUES (36, 27, NULL, NULL, 'admin_reverse', 69, 70);
INSERT INTO `acos` VALUES (37, 27, NULL, NULL, 'priority', 71, 72);
INSERT INTO `acos` VALUES (38, 27, NULL, NULL, 'admin_priority', 73, 74);
INSERT INTO `acos` VALUES (39, 1, NULL, NULL, 'Products', 76, 99);
INSERT INTO `acos` VALUES (40, 39, NULL, NULL, 'index', 77, 78);
INSERT INTO `acos` VALUES (41, 39, NULL, NULL, 'view', 79, 80);
INSERT INTO `acos` VALUES (42, 39, NULL, NULL, 'add', 81, 82);
INSERT INTO `acos` VALUES (43, 39, NULL, NULL, 'edit', 83, 84);
INSERT INTO `acos` VALUES (44, 39, NULL, NULL, 'delete', 85, 86);
INSERT INTO `acos` VALUES (45, 39, NULL, NULL, 'actionCase', 87, 88);
INSERT INTO `acos` VALUES (46, 39, NULL, NULL, 'admin_actionCase', 89, 90);
INSERT INTO `acos` VALUES (47, 39, NULL, NULL, 'reverse', 91, 92);
INSERT INTO `acos` VALUES (48, 39, NULL, NULL, 'admin_reverse', 93, 94);
INSERT INTO `acos` VALUES (49, 39, NULL, NULL, 'priority', 95, 96);
INSERT INTO `acos` VALUES (50, 39, NULL, NULL, 'admin_priority', 97, 98);
INSERT INTO `acos` VALUES (51, 1, NULL, NULL, 'Users', 100, 137);
INSERT INTO `acos` VALUES (52, 51, NULL, NULL, 'login', 101, 102);
INSERT INTO `acos` VALUES (53, 51, NULL, NULL, 'logout', 103, 104);
INSERT INTO `acos` VALUES (54, 51, NULL, NULL, 'home', 105, 106);
INSERT INTO `acos` VALUES (55, 51, NULL, NULL, 'index', 107, 108);
INSERT INTO `acos` VALUES (56, 51, NULL, NULL, 'view', 109, 110);
INSERT INTO `acos` VALUES (57, 51, NULL, NULL, 'add', 111, 112);
INSERT INTO `acos` VALUES (58, 51, NULL, NULL, 'edit', 113, 114);
INSERT INTO `acos` VALUES (59, 51, NULL, NULL, 'delete', 115, 116);
INSERT INTO `acos` VALUES (60, 51, NULL, NULL, 'admin_initDB', 117, 118);
INSERT INTO `acos` VALUES (61, 51, NULL, NULL, 'admin_build_acl', 119, 120);
INSERT INTO `acos` VALUES (62, 51, NULL, NULL, 'initDB', 121, 122);
INSERT INTO `acos` VALUES (63, 51, NULL, NULL, 'build_acl', 123, 124);
INSERT INTO `acos` VALUES (64, 51, NULL, NULL, 'actionCase', 125, 126);
INSERT INTO `acos` VALUES (65, 51, NULL, NULL, 'admin_actionCase', 127, 128);
INSERT INTO `acos` VALUES (66, 51, NULL, NULL, 'reverse', 129, 130);
INSERT INTO `acos` VALUES (67, 51, NULL, NULL, 'admin_reverse', 131, 132);
INSERT INTO `acos` VALUES (68, 51, NULL, NULL, 'priority', 133, 134);
INSERT INTO `acos` VALUES (69, 51, NULL, NULL, 'admin_priority', 135, 136);

-- --------------------------------------------------------

-- 
-- 表的结构 `aros`
-- 

CREATE TABLE `aros` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `parent_id` int(10) default NULL,
  `model` varchar(255) collate utf8_unicode_ci default NULL,
  `foreign_key` int(10) unsigned default NULL,
  `alias` varchar(255) collate utf8_unicode_ci default NULL,
  `lft` int(10) default NULL,
  `rght` int(10) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

-- 
-- 导出表中的数据 `aros`
-- 

INSERT INTO `aros` VALUES (1, NULL, 'Group', 1, 'admin', 1, 4);
INSERT INTO `aros` VALUES (2, 1, 'User', 1, 'admin', 2, 3);

-- --------------------------------------------------------

-- 
-- 表的结构 `aros_acos`
-- 

CREATE TABLE `aros_acos` (
  `id` int(10) NOT NULL auto_increment,
  `aro_id` int(10) NOT NULL,
  `aco_id` int(10) NOT NULL,
  `_create` varchar(2) collate utf8_unicode_ci NOT NULL default '0',
  `_read` varchar(2) collate utf8_unicode_ci NOT NULL default '0',
  `_update` varchar(2) collate utf8_unicode_ci NOT NULL default '0',
  `_delete` varchar(2) collate utf8_unicode_ci NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `ARO_ACO_KEY` (`aro_id`,`aco_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

-- 
-- 导出表中的数据 `aros_acos`
-- 

INSERT INTO `aros_acos` VALUES (1, 1, 1, '1', '1', '1', '1');

-- --------------------------------------------------------

-- 
-- 表的结构 `categories`
-- 

CREATE TABLE `categories` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(100) collate utf8_unicode_ci default NULL,
  `hidden` tinyint(1) default '0',
  `priority` int(10) unsigned default NULL,
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `priority` (`priority`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

-- 
-- 导出表中的数据 `categories`
-- 

INSERT INTO `categories` VALUES (1, 'show', 0, 0, '2010-01-05 07:24:05', '2010-01-05 07:24:05');

-- --------------------------------------------------------

-- 
-- 表的结构 `groups`
-- 

CREATE TABLE `groups` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(128) collate utf8_unicode_ci NOT NULL,
  `hidden` tinyint(1) default '0',
  `priority` int(11) default '0',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

-- 
-- 导出表中的数据 `groups`
-- 

INSERT INTO `groups` VALUES (1, 'admin', 0, 0, '2010-01-05 06:40:59', '2010-01-05 06:40:59');

-- --------------------------------------------------------

-- 
-- 表的结构 `products`
-- 

CREATE TABLE `products` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `category_id` int(10) unsigned NOT NULL,
  `name` varchar(100) collate utf8_unicode_ci default NULL,
  `price` decimal(7,2) default NULL,
  `hidden` tinyint(1) default '0',
  `priority` int(10) unsigned default NULL,
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `priority` (`priority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- 
-- 导出表中的数据 `products`
-- 


-- --------------------------------------------------------

-- 
-- 表的结构 `users`
-- 

CREATE TABLE `users` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `group_id` int(11) unsigned NOT NULL,
  `username` varchar(128) collate utf8_unicode_ci NOT NULL,
  `password` char(40) collate utf8_unicode_ci NOT NULL,
  `email` varchar(128) collate utf8_unicode_ci NOT NULL,
  `last_access_ip` varchar(40) collate utf8_unicode_ci default NULL,
  `last_access_datetime` datetime default NULL,
  `hidden` tinyint(1) default '0',
  `active` tinyint(1) default '1',
  `priority` int(10) unsigned default '0',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `username` (`username`),
  KEY `priority` (`priority`),
  KEY `users_ibfk_1` (`group_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

-- 
-- 导出表中的数据 `users`
-- 

INSERT INTO `users` VALUES (1, 1, 'admin', '50fc86aa3407f54fb91c38b888712436abf1edd0', 'oscar@sunnyvision.com', '127.0.0.1', '2010-01-20 01:36:11', 0, 1, 0, '2010-01-05 06:42:16', '2010-01-20 01:36:11');

-- 
-- 限制导出的表
-- 

-- 
-- 限制表 `users`
-- 
ALTER TABLE `users`
  ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`);
