MySQL Create Table SQL
Table Structure: okayapi_comment:/tablelist/okayapi_comment.html
-- MySQL Table okayapi_comment
-- From: OkayAPI.com
CREATE TABLE `okayapi_comment` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`toId` bigint(15) NOT NULL DEFAULT '0' COMMENT '被回复的id',
`userId` bigint(15) NOT NULL COMMENT '评论人 User 的 id',
`momentId` bigint(15) NOT NULL COMMENT '动态id',
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
`content` varchar(1000) NOT NULL COMMENT '内容',
KEY `toId` (`toId`),
KEY `userId` (`userId`),
KEY `momentId` (`momentId`),
KEY `date` (`date`),
KEY `content` (`content`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT 'web开发-评论';
After replication, you can go to the database to create the database table.
MySQL database table structure design
Displaying 1-5 of 5 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
toId | bigint(15) | 0 | 否 | 被回复的id | Normal Index | 0 |
userId | bigint(15) | 否 | 评论人 User 的 id | Normal Index | ||
momentId | bigint(15) | 否 | 动态id | Normal Index | ||
date | timestamp | CURRENT_TIMESTAMP | 是 | 创建日期 | CURRENT_TIMESTAMP | |
content | varchar(1000) | 否 | 内容 |