更新模型
This commit is contained in:
parent
b5c0a3abaf
commit
f44af281f6
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1479304794" Name="zheng" Objects="186" Symbols="24" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1479304808" Name="zheng" Objects="186" Symbols="24" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
||||||
<!-- do not edit this file -->
|
<!-- do not edit this file -->
|
||||||
|
|
||||||
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
|
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
|
||||||
|
@ -4333,9 +4333,9 @@ DESTINATION 0 新宋体,8,N</a:FontList>
|
||||||
</o:ReferenceSymbol>
|
</o:ReferenceSymbol>
|
||||||
<o:ReferenceSymbol Id="o33">
|
<o:ReferenceSymbol Id="o33">
|
||||||
<a:CreationDate>1478153486</a:CreationDate>
|
<a:CreationDate>1478153486</a:CreationDate>
|
||||||
<a:ModificationDate>1479303515</a:ModificationDate>
|
<a:ModificationDate>1479304808</a:ModificationDate>
|
||||||
<a:Rect>((5302,25603), (20470,31523))</a:Rect>
|
<a:Rect>((13484,27785), (20470,32683))</a:Rect>
|
||||||
<a:ListOfPoints>((5702,31065),(5702,31123),(20070,31123),(20070,26228),(17070,26228))</a:ListOfPoints>
|
<a:ListOfPoints>((13884,31065),(13884,32283),(20070,32283),(20070,28410),(16934,28410))</a:ListOfPoints>
|
||||||
<a:CornerStyle>1</a:CornerStyle>
|
<a:CornerStyle>1</a:CornerStyle>
|
||||||
<a:ArrowStyle>1</a:ArrowStyle>
|
<a:ArrowStyle>1</a:ArrowStyle>
|
||||||
<a:LineColor>12615680</a:LineColor>
|
<a:LineColor>12615680</a:LineColor>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
/*==============================================================*/
|
/*==============================================================*/
|
||||||
/* DBMS name: MySQL 5.0 */
|
/* DBMS name: MySQL 5.0 */
|
||||||
/* Created on: 2016/11/3 14:17:39 */
|
/* Created on: 2016/11/20 16:47:38 */
|
||||||
/*==============================================================*/
|
/*==============================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,11 +36,9 @@ create table cms_article
|
||||||
description varchar(500) default NULL comment '简介',
|
description varchar(500) default NULL comment '简介',
|
||||||
type tinyint(4) not null default 1 comment '类型(1:普通,2:热门...)',
|
type tinyint(4) not null default 1 comment '类型(1:普通,2:热门...)',
|
||||||
allowcomments tinyint(4) not null default 1 comment '是否允许评论(0:不允许,1:允许)',
|
allowcomments tinyint(4) not null default 1 comment '是否允许评论(0:不允许,1:允许)',
|
||||||
status tinyint(4) not null default 1 comment '状态(-1:审核不通过回收站,0:刚发布未审核,1:已审核公开,2:已审核个人)',
|
status tinyint(4) not null default 1 comment '状态(-1:不通过,0未审核,1:通过)',
|
||||||
content mediumtext comment '内容',
|
content mediumtext comment '内容',
|
||||||
user_id int(10) unsigned not null comment '发布人id',
|
user_id int(10) unsigned not null comment '发布人id',
|
||||||
up int(10) unsigned not null default 0 comment '顶',
|
|
||||||
down int(10) unsigned not null default 0 comment '踩',
|
|
||||||
readnumber int(10) unsigned not null default 0 comment '阅读数量',
|
readnumber int(10) unsigned not null default 0 comment '阅读数量',
|
||||||
ctime bigint(20) unsigned not null comment '创建时间',
|
ctime bigint(20) unsigned not null comment '创建时间',
|
||||||
orders bigint(20) unsigned not null comment '排序',
|
orders bigint(20) unsigned not null comment '排序',
|
||||||
|
@ -134,7 +132,7 @@ create table cms_comment
|
||||||
article_id int(10) unsigned not null comment '文章编号',
|
article_id int(10) unsigned not null comment '文章编号',
|
||||||
user_id int(10) unsigned not null comment '用户编号',
|
user_id int(10) unsigned not null comment '用户编号',
|
||||||
content text not null comment '评论内容',
|
content text not null comment '评论内容',
|
||||||
status tinyint(4) not null default 1 comment '状态(-1:审核不通过,0:未审核,1:已审核通过)',
|
status tinyint(4) not null default 1 comment '状态(-1:不通过,0:未审核,1:通过)',
|
||||||
ip varchar(30) default NULL comment '评论人ip地址',
|
ip varchar(30) default NULL comment '评论人ip地址',
|
||||||
agent varchar(200) default NULL comment '评论人终端信息',
|
agent varchar(200) default NULL comment '评论人终端信息',
|
||||||
ctime bigint(20) not null comment '创建时间',
|
ctime bigint(20) not null comment '创建时间',
|
||||||
|
@ -200,32 +198,32 @@ ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表';
|
||||||
alter table test_user comment 'test_user 用户';
|
alter table test_user comment 'test_user 用户';
|
||||||
|
|
||||||
alter table cms_article_category add constraint FK_Reference_7 foreign key (category_id)
|
alter table cms_article_category add constraint FK_Reference_7 foreign key (category_id)
|
||||||
references cms_category (category_id) on delete restrict on update restrict;
|
references cms_category (category_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
alter table cms_article_category add constraint FK_Reference_8 foreign key (article_id)
|
alter table cms_article_category add constraint FK_Reference_8 foreign key (article_id)
|
||||||
references cms_article (article_id) on delete restrict on update restrict;
|
|
||||||
|
|
||||||
alter table cms_article_tag add constraint FK_Reference_3 foreign key (article_id)
|
|
||||||
references cms_article (article_id) on delete restrict on update restrict;
|
|
||||||
|
|
||||||
alter table cms_article_tag add constraint FK_Reference_4 foreign key (tag_id)
|
|
||||||
references cms_tag (tag_id) on delete restrict on update restrict;
|
|
||||||
|
|
||||||
alter table cms_category add constraint FK_Reference_10 foreign key (pid)
|
|
||||||
references cms_category (category_id) on delete restrict on update restrict;
|
|
||||||
|
|
||||||
alter table cms_category_tag add constraint FK_Reference_5 foreign key (category_id)
|
|
||||||
references cms_category (category_id) on delete restrict on update restrict;
|
|
||||||
|
|
||||||
alter table cms_category_tag add constraint FK_Reference_6 foreign key (tag_id)
|
|
||||||
references cms_tag (tag_id) on delete restrict on update restrict;
|
|
||||||
|
|
||||||
alter table cms_comment add constraint cms_comment_article_id foreign key (article_id)
|
|
||||||
references cms_article (article_id) on delete cascade on update cascade;
|
references cms_article (article_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
alter table cms_comment add constraint cms_comment_pid foreign key (pid)
|
alter table cms_article_tag add constraint FK_Reference_3 foreign key (article_id)
|
||||||
references cms_comment (comment_id) on delete cascade on update cascade;
|
references cms_article (article_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
|
alter table cms_article_tag add constraint FK_Reference_4 foreign key (tag_id)
|
||||||
|
references cms_tag (tag_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
|
alter table cms_category add constraint FK_Reference_10 foreign key (pid)
|
||||||
|
references cms_category (category_id) on delete set null on update restrict;
|
||||||
|
|
||||||
|
alter table cms_category_tag add constraint FK_Reference_5 foreign key (category_id)
|
||||||
|
references cms_category (category_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
|
alter table cms_category_tag add constraint FK_Reference_6 foreign key (tag_id)
|
||||||
|
references cms_tag (tag_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
|
alter table cms_comment add constraint FK_Reference_1 foreign key (article_id)
|
||||||
|
references cms_article (article_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
|
alter table cms_comment add constraint FK_Reference_2 foreign key (pid)
|
||||||
|
references cms_comment (comment_id) on delete set null;
|
||||||
|
|
||||||
alter table test_book add constraint FK_Reference_9 foreign key (user_id)
|
alter table test_book add constraint FK_Reference_9 foreign key (user_id)
|
||||||
references test_user (user_id) on delete restrict on update restrict;
|
references test_user (user_id) on delete cascade on update cascade;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue