CREATE
TABLE
`bbs_category` (
`id`
int
(11)
NOT
NULL
AUTO_INCREMENT,
`
name
`
varchar
(100)
NOT
NULL
,
`orderId`
int
(11)
DEFAULT
NULL
,
PRIMARY
KEY
(`id`)
)
CREATE
TABLE
`bbs_forum` (
`id`
int
(11)
NOT
NULL
AUTO_INCREMENT,
`
name
`
varchar
(100)
NOT
NULL
,
`iconPath`
varchar
(200)
DEFAULT
NULL
,
`orderId`
int
(11)
DEFAULT
NULL
,
`topicCount`
int
(11)
DEFAULT
NULL
,
`articleCount`
int
(11)
DEFAULT
NULL
,
`categoryId`
int
(11)
DEFAULT
NULL
,
PRIMARY
KEY
(`id`),
KEY
`FK_bbs_forum` (`categoryId`),
CONSTRAINT
`FK_bbs_forum`
FOREIGN
KEY
(`categoryId`)
REFERENCES
`bbs_category` (`id`)
)