forked from Hareric/Spring-MVC-CloudMusic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDDL.sql
151 lines (124 loc) · 4.53 KB
/
DDL.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
-- MySQL dump 10.13 Distrib 5.6.26, for osx10.8 (x86_64)
--
-- Host: localhost Database: music
-- ------------------------------------------------------
-- Server version 5.6.26
NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- 用户信息表
--
DROP TABLE IF EXISTS `app_Info`;
CREATE TABLE `app_Info` (
`user_id` int(10) NOT NULL,
`name` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(34) COLLATE utf8_unicode_ci NOT NULL,
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 用户表
--
DROP TABLE IF EXISTS `app_User`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_User` (
`email` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
`pwd` char(34) COLLATE utf8_unicode_ci NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`regDate` date NOT NULL,
`root` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1891515956 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 音乐信息表
--
DROP TABLE IF EXISTS `app_Music`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_Music` (
`name` text COLLATE utf8_unicode_ci NOT NULL,
`src` text COLLATE utf8_unicode_ci NOT NULL,
`lyric` text COLLATE utf8_unicode_ci NOT NULL,
`music_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`listeners` int(10) unsigned NOT NULL,
PRIMARY KEY (`music_id`)
) ENGINE=MyISAM AUTO_INCREMENT=27483207 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 新闻推送信息表
--
DROP TABLE IF EXISTS `app_News`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_News` (
`title` text COLLATE utf8_unicode_ci NOT NULL,
`content` text COLLATE utf8_unicode_ci NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
`pubDate` date NOT NULL,
PRIMARY KEY (`type`,`pubDate`,`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 歌手信息表
--
DROP TABLE IF EXISTS `app_Singer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_Singer` (
`singer_id` int(11) NOT NULL AUTO_INCREMENT,
`singer_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
`counrtry` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
`birthday` date NOT NULL,
PRIMARY KEY (`singer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 用户音乐收藏表
--
DROP TABLE IF EXISTS `app_collection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_collection` (
`user_id` int(10) unsigned NOT NULL,
`music_id` int(10) unsigned NOT NULL,
`colDate` date NOT NULL,
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 歌曲类型表
--
DROP TABLE IF EXISTS `app_Class`;
CREATE TABLE `app_Class` (
`class_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
`class_id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 音乐-类型表
--
DROP TABLE IF EXISTS `app_musicRclass`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_musicRclass` (
`class_id` int(11) NOT NULL,
`music_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 音乐-歌手表
--
DROP TABLE IF EXISTS `app_singerRmusic`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `app_singerRmusic` (
`singer_id` int(11) NOT NULL,
`music_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;