用户表数据库结构
--
-- 表的结构 `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`user_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(60) NOT NULL,
`email` varchar(100) NOT NULL,
`auth_key` varchar(32) NOT NULL DEFAULT '',
`password_hash` varchar(128) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '10',
`registered` datetime NOT NULL,
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- 表的结构 `user_meta`
--
CREATE TABLE IF NOT EXISTS `user_meta` (
`user_meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`meta_key` varchar(200) NOT NULL,
`meta_value` text NOT NULL,
PRIMARY KEY (`user_meta_id`),
UNIQUE KEY `user_key` (`user_id`,`meta_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;