加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mybbs.sql 2.44 KB
一键复制 编辑 原始数据 按行查看 历史
Lutils 提交于 2017-03-15 14:26 . 添加置顶加精属性
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50716
Source Host : localhost:3306
Source Database : mybbs
Target Server Type : MYSQL
Target Server Version : 50716
File Encoding : 65001
Date: 2017-03-15 14:14:05
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`aid` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) DEFAULT NULL,
`content` text,
`date` datetime DEFAULT NULL,
`uid` int(11) NOT NULL,
`lable` varchar(100) DEFAULT NULL,
`status` int(10) unsigned zerofill DEFAULT NULL,
PRIMARY KEY (`aid`),
KEY `uid` (`uid`),
CONSTRAINT `uid` FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`cid` int(11) NOT NULL AUTO_INCREMENT,
`content` text,
`aid` int(11) NOT NULL,
`uid` int(11) NOT NULL,
`date` datetime DEFAULT NULL,
PRIMARY KEY (`cid`),
KEY `aid` (`aid`),
KEY `uid` (`uid`),
CONSTRAINT `aid` FOREIGN KEY (`aid`) REFERENCES `article` (`aid`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `comment_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for floor
-- ----------------------------
DROP TABLE IF EXISTS `floor`;
CREATE TABLE `floor` (
`fid` int(11) NOT NULL AUTO_INCREMENT,
`aid` int(11) NOT NULL,
`cid` int(11) NOT NULL,
`uid` int(11) NOT NULL,
`content` varchar(255) DEFAULT NULL,
PRIMARY KEY (`fid`),
KEY `cid` (`cid`),
CONSTRAINT `cid` FOREIGN KEY (`cid`) REFERENCES `comment` (`cid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`headimg` varchar(255) DEFAULT NULL,
PRIMARY KEY (`uid`),
KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS=1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化