-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsql
39 lines (35 loc) · 958 Bytes
/
sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- This file is use for sae.
-- generating SQL for users:
create table `users` (
`id` varchar(50) not null,
`email` varchar(50) not null,
`password` varchar(50) not null,
`admin` bool not null,
`created_at` real not null,
primary key(`id`)
) charset=utf8;
-- generating SQL for blogs:
create table `blogs` (
`id` varchar(50) not null,
`user_id` varchar(50) not null,
`title` varchar(50) not null,
`content` text not null,
`image` varchar(500) not null,
`created_at` real not null,
`click` bigint not null,
primary key(`id`)
) charset=utf8;
-- generating SQL for tags:
create table `tags` (
`id` varchar(50) not null,
`name` varchar(50) not null,
`number` bigint not null,
primary key(`id`)
)default charset=utf8;
-- generating SQL for blogtag:
create table `blogtag` (
`id` varchar(50) not null,
`blog_id` varchar(50) not null,
`tag_id` varchar(50) not null,
primary key(`id`)
)default charset=utf8;