DROP TABLE IF EXISTS `pw_hook`;
CREATE TABLE `pw_hook` (
`name` VARCHAR(50) NOT NULL DEFAULT '',
`app_id` CHAR(20) NOT NULL DEFAULT '',
`app_name` VARCHAR(100) NOT NULL DEFAULT '',
`created_time` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`modified_time` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`document` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`name`),
KEY `IDX_NAME` (`name`)
)ENGINE=MYISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `pw_hook_inject`;
CREATE TABLE `pw_hook_inject` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`app_id` CHAR(20) NOT NULL DEFAULT '',
`app_name` VARCHAR(100) NOT NULL DEFAULT '',
`hook_name` VARCHAR(100) NOT NULL DEFAULT '',
`alias` VARCHAR(100) NOT NULL DEFAULT '',
`class` VARCHAR(100) NOT NULL DEFAULT '',
`method` VARCHAR(100) NOT NULL DEFAULT '',
`loadway` VARCHAR(20) NOT NULL DEFAULT '',
`expression` VARCHAR(100) NOT NULL DEFAULT '',
`created_time` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`modified_time` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`description` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE (`hook_name`,`alias`),
KEY `IDX_HOOK_NAME` (`hook_name`)
)ENGINE=MYISAM DEFAULT CHARSET=utf8;