|
/*
|
|
Navicat MySQL Data Transfer
|
|
|
|
Source Server : Tina
|
|
Source Server Version : 50506
|
|
Source Host : localhost:3306
|
|
Source Database : missphoto
|
|
|
|
Target Server Type : MYSQL
|
|
Target Server Version : 50506
|
|
File Encoding : 65001
|
|
|
|
Date: 2016-12-07 21:43:47
|
|
*/
|
|
|
|
SET FOREIGN_KEY_CHECKS=0;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for `comment`
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `comment`;
|
|
CREATE TABLE `comment` (
|
|
`did` int(5) NOT NULL,
|
|
`uid` int(5) NOT NULL,
|
|
`comment` char(30) NOT NULL,
|
|
PRIMARY KEY (`did`,`uid`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
-- ----------------------------
|
|
-- Records of comment
|
|
-- ----------------------------
|
|
|
|
-- ----------------------------
|
|
-- Table structure for `draw`
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `draw`;
|
|
CREATE TABLE `draw` (
|
|
`did` int(5) NOT NULL AUTO_INCREMENT,
|
|
`dlike` int(5) NOT NULL,
|
|
`durl` char(30) NOT NULL,
|
|
`udid` int(5) NOT NULL,
|
|
PRIMARY KEY (`did`),
|
|
KEY `udid` (`udid`),
|
|
CONSTRAINT `udid` FOREIGN KEY (`udid`) REFERENCES `user` (`uid`) ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
-- ----------------------------
|
|
-- Records of draw
|
|
-- ----------------------------
|
|
|
|
-- ----------------------------
|
|
-- Table structure for `request`
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `request`;
|
|
CREATE TABLE `request` (
|
|
`rid` int(5) NOT NULL,
|
|
`rdetail` int(5) NOT NULL,
|
|
`rdate` date NOT NULL,
|
|
`uid` int(5) NOT NULL,
|
|
PRIMARY KEY (`rid`),
|
|
KEY `uid` (`uid`),
|
|
CONSTRAINT `uid` FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
-- ----------------------------
|
|
-- Records of request
|
|
-- ----------------------------
|
|
|
|
-- ----------------------------
|
|
-- Table structure for `user`
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `user`;
|
|
CREATE TABLE `user` (
|
|
`uid` int(5) NOT NULL AUTO_INCREMENT COMMENT '用户id',
|
|
`uname` char(20) NOT NULL COMMENT '用户名',
|
|
`uaccount` char(20) NOT NULL COMMENT '用户注册使用的账号(手机/qq/微博)',
|
|
PRIMARY KEY (`uid`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
-- ----------------------------
|
|
-- Records of user
|
|
-- ----------------------------
|