12345678910111213141516171819202122 |
- create table article
- (
- id int auto_increment
- primary key,
- title varchar(120) not null,
- createtime datetime not null,
- author_id int not null,
- constraint article_auth_user_id_fk
- foreign key (author_id) references auth_user (id)
- );
- create table content
- (
- id int not null
- primary key,
- content text null,
- constraint content_article_id_fk
- foreign key (id) references article (id)
- );
- CREATE DATABASE `cm_blog` /*!40100 DEFAULT CHARACTER SET utf8mb4 */
|