1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

所有song_id都改为bigint(20)

This commit is contained in:
程序员小墨 2022-11-10 14:31:21 +08:00
parent 3ec2ac1796
commit de815fed87
2 changed files with 27 additions and 25 deletions

View File

@ -11,11 +11,13 @@
Target Server Version : 80012 Target Server Version : 80012
File Encoding : 65001 File Encoding : 65001
Date: 09/11/2022 16:44:14 Date: 10/11/2022 14:27:21
*/ */
/*
CREATE DATABASE `neteaseMusic` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci'; CREATE DATABASE `neteaseMusic` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci';
USE `neteaseMusic`; USE `neteaseMusic`;
*/
SET NAMES utf8mb4; SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0; SET FOREIGN_KEY_CHECKS = 0;
@ -25,7 +27,7 @@ SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `album`; DROP TABLE IF EXISTS `album`;
CREATE TABLE `album` ( CREATE TABLE `album` (
`album_id` int(10) UNSIGNED NOT NULL COMMENT '专辑id', `album_id` bigint(20) UNSIGNED NOT NULL COMMENT '专辑id',
`title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专辑名', `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专辑名',
`description` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专辑简介', `description` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专辑简介',
`full_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '专辑简介(全)', `full_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '专辑简介(全)',
@ -55,7 +57,7 @@ CREATE TABLE `analysis` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `artist`; DROP TABLE IF EXISTS `artist`;
CREATE TABLE `artist` ( CREATE TABLE `artist` (
`artist_id` int(10) UNSIGNED NOT NULL COMMENT '歌手id', `artist_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌手id',
`title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌手名', `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌手名',
`description` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌手简介', `description` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌手简介',
`image` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '封面图 http://p1.music.126.net/ 后面的部分', `image` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '封面图 http://p1.music.126.net/ 后面的部分',
@ -91,7 +93,7 @@ CREATE TABLE `comment` (
`comment_id` bigint(20) UNSIGNED NOT NULL COMMENT '评论id', `comment_id` bigint(20) UNSIGNED NOT NULL COMMENT '评论id',
`parent_comment_id` bigint(20) UNSIGNED NOT NULL COMMENT '父评论id', `parent_comment_id` bigint(20) UNSIGNED NOT NULL COMMENT '父评论id',
`user_id` bigint(20) UNSIGNED NOT NULL COMMENT '用户id', `user_id` bigint(20) UNSIGNED NOT NULL COMMENT '用户id',
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '评论内容', `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '评论内容',
`time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '评论时间', `time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '评论时间',
`like_count` int(11) NOT NULL COMMENT '点赞数', `like_count` int(11) NOT NULL COMMENT '点赞数',
@ -108,7 +110,7 @@ CREATE TABLE `comment` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `comment_progress`; DROP TABLE IF EXISTS `comment_progress`;
CREATE TABLE `comment_progress` ( CREATE TABLE `comment_progress` (
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`max_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '开始爬取/开始增量爬取的时候 最新一条评论的时间', `max_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '开始爬取/开始增量爬取的时候 最新一条评论的时间',
`min_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0', `min_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0',
`current_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间', `current_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间',
@ -137,7 +139,7 @@ CREATE TABLE `log` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `lyric`; DROP TABLE IF EXISTS `lyric`;
CREATE TABLE `lyric` ( CREATE TABLE `lyric` (
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`version` int(10) UNSIGNED NOT NULL COMMENT '歌词版本 -1代表没有数据', `version` int(10) UNSIGNED NOT NULL COMMENT '歌词版本 -1代表没有数据',
`lyric` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌词', `lyric` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌词',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
@ -197,7 +199,7 @@ CREATE TABLE `playlist` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `song`; DROP TABLE IF EXISTS `song`;
CREATE TABLE `song` ( CREATE TABLE `song` (
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌曲名', `title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌曲名',
`type` tinyint(4) NOT NULL COMMENT ' 0: 一般类型 1: 通过云盘上传的音乐,网易云不存在公开对应 2: 通过云盘上传的音乐,网易云存在公开对应', `type` tinyint(4) NOT NULL COMMENT ' 0: 一般类型 1: 通过云盘上传的音乐,网易云不存在公开对应 2: 通过云盘上传的音乐,网易云存在公开对应',
`alias` json NULL COMMENT '歌曲别名JSON格式数组', `alias` json NULL COMMENT '歌曲别名JSON格式数组',
@ -229,8 +231,8 @@ CREATE TABLE `song` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `song_album_relation`; DROP TABLE IF EXISTS `song_album_relation`;
CREATE TABLE `song_album_relation` ( CREATE TABLE `song_album_relation` (
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`album_id` int(10) UNSIGNED NOT NULL COMMENT '专辑id', `album_id` bigint(20) UNSIGNED NOT NULL COMMENT '专辑id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
PRIMARY KEY (`song_id`, `album_id`) USING BTREE, PRIMARY KEY (`song_id`, `album_id`) USING BTREE,
@ -243,8 +245,8 @@ CREATE TABLE `song_album_relation` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `song_artist_relation`; DROP TABLE IF EXISTS `song_artist_relation`;
CREATE TABLE `song_artist_relation` ( CREATE TABLE `song_artist_relation` (
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`artist_id` int(10) UNSIGNED NOT NULL COMMENT '歌手id', `artist_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌手id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
PRIMARY KEY (`song_id`, `artist_id`) USING BTREE, PRIMARY KEY (`song_id`, `artist_id`) USING BTREE,
@ -257,8 +259,8 @@ CREATE TABLE `song_artist_relation` (
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `song_playlist_relation`; DROP TABLE IF EXISTS `song_playlist_relation`;
CREATE TABLE `song_playlist_relation` ( CREATE TABLE `song_playlist_relation` (
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id',
`playlist_id` int(10) UNSIGNED NOT NULL COMMENT '歌单id', `playlist_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌单id',
`is_del` tinyint(4) NOT NULL DEFAULT 0 COMMENT '歌曲是否从歌单中删除 0-未删除 1-删除', `is_del` tinyint(4) NOT NULL DEFAULT 0 COMMENT '歌曲是否从歌单中删除 0-未删除 1-删除',
`alg` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保留字段', `alg` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保留字段',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',

View File

@ -1,7 +1,7 @@
CREATE DATABASE `neteaseMusic`; CREATE DATABASE `neteaseMusic`;
USE `neteaseMusic`; USE `neteaseMusic`;
CREATE TABLE `song` ( CREATE TABLE `song` (
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`title` varchar(500) NOT NULL COMMENT '歌曲名', `title` varchar(500) NOT NULL COMMENT '歌曲名',
`type` tinyint(4) NOT NULL COMMENT ' 0: 一般类型 1: 通过云盘上传的音乐,网易云不存在公开对应 2: 通过云盘上传的音乐,网易云存在公开对应', `type` tinyint(4) NOT NULL COMMENT ' 0: 一般类型 1: 通过云盘上传的音乐,网易云不存在公开对应 2: 通过云盘上传的音乐,网易云存在公开对应',
`alias` json DEFAULT NULL COMMENT '歌曲别名JSON格式数组', `alias` json DEFAULT NULL COMMENT '歌曲别名JSON格式数组',
@ -29,7 +29,7 @@ CREATE TABLE `song` (
); );
CREATE TABLE `artist` ( CREATE TABLE `artist` (
`artist_id` int(10) unsigned NOT NULL COMMENT '歌手id', `artist_id` bigint(20) unsigned NOT NULL COMMENT '歌手id',
`title` varchar(200) NOT NULL COMMENT '歌手名', `title` varchar(200) NOT NULL COMMENT '歌手名',
`description` varchar(1500) NOT NULL COMMENT '歌手简介', `description` varchar(1500) NOT NULL COMMENT '歌手简介',
`image` varchar(200) NOT NULL COMMENT '封面图 http://p1.music.126.net/ 后面的部分', `image` varchar(200) NOT NULL COMMENT '封面图 http://p1.music.126.net/ 后面的部分',
@ -41,7 +41,7 @@ CREATE TABLE `artist` (
); );
CREATE TABLE `album` ( CREATE TABLE `album` (
`album_id` int(10) unsigned NOT NULL COMMENT '专辑id', `album_id` bigint(20) unsigned NOT NULL COMMENT '专辑id',
`title` varchar(200) NOT NULL COMMENT '专辑名', `title` varchar(200) NOT NULL COMMENT '专辑名',
`description` varchar(1500) NOT NULL COMMENT '专辑简介', `description` varchar(1500) NOT NULL COMMENT '专辑简介',
`full_description` text COMMENT '专辑简介(全)', `full_description` text COMMENT '专辑简介(全)',
@ -103,8 +103,8 @@ CREATE TABLE `playlist` (
); );
CREATE TABLE `song_playlist_relation` ( CREATE TABLE `song_playlist_relation` (
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`playlist_id` int(10) unsigned NOT NULL COMMENT '歌单id', `playlist_id` bigint(20) unsigned NOT NULL COMMENT '歌单id',
`is_del` tinyint(4) NOT NULL DEFAULT 0 COMMENT '歌曲是否从歌单中删除 0-未删除 1-删除', `is_del` tinyint(4) NOT NULL DEFAULT 0 COMMENT '歌曲是否从歌单中删除 0-未删除 1-删除',
`alg` varchar(20) DEFAULT NULL COMMENT '保留字段', `alg` varchar(20) DEFAULT NULL COMMENT '保留字段',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
@ -115,8 +115,8 @@ CREATE TABLE `song_playlist_relation` (
); );
CREATE TABLE `song_album_relation` ( CREATE TABLE `song_album_relation` (
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`album_id` int(10) unsigned NOT NULL COMMENT '专辑id', `album_id` bigint(20) unsigned NOT NULL COMMENT '专辑id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
PRIMARY KEY (`song_id`,`album_id`), PRIMARY KEY (`song_id`,`album_id`),
@ -125,8 +125,8 @@ CREATE TABLE `song_album_relation` (
); );
CREATE TABLE `song_artist_relation` ( CREATE TABLE `song_artist_relation` (
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`artist_id` int(10) unsigned NOT NULL COMMENT '歌手id', `artist_id` bigint(20) unsigned NOT NULL COMMENT '歌手id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
PRIMARY KEY `song_id` (`song_id`,`artist_id`), PRIMARY KEY `song_id` (`song_id`,`artist_id`),
@ -135,7 +135,7 @@ CREATE TABLE `song_artist_relation` (
); );
CREATE TABLE `lyric` ( CREATE TABLE `lyric` (
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`version` int(10) unsigned NOT NULL COMMENT '歌词版本 -1代表没有数据', `version` int(10) unsigned NOT NULL COMMENT '歌词版本 -1代表没有数据',
`lyric` text NOT NULL COMMENT '歌词', `lyric` text NOT NULL COMMENT '歌词',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
@ -159,7 +159,7 @@ CREATE TABLE `comment` (
`comment_id` bigint(20) unsigned NOT NULL COMMENT '评论id', `comment_id` bigint(20) unsigned NOT NULL COMMENT '评论id',
`parent_comment_id` bigint(20) unsigned NOT NULL COMMENT '父评论id', `parent_comment_id` bigint(20) unsigned NOT NULL COMMENT '父评论id',
`user_id` bigint(20) unsigned NOT NULL COMMENT '用户id', `user_id` bigint(20) unsigned NOT NULL COMMENT '用户id',
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`content` text NOT NULL COMMENT '评论内容', `content` text NOT NULL COMMENT '评论内容',
`time` varchar(50) NOT NULL DEFAULT '' COMMENT '评论时间', `time` varchar(50) NOT NULL DEFAULT '' COMMENT '评论时间',
`like_count` int(11) NOT NULL COMMENT '点赞数', `like_count` int(11) NOT NULL COMMENT '点赞数',
@ -172,7 +172,7 @@ CREATE TABLE `comment` (
); );
CREATE TABLE `comment_progress` ( CREATE TABLE `comment_progress` (
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id',
`max_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '开始爬取/开始增量爬取的时候 最新一条评论的时间', `max_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '开始爬取/开始增量爬取的时候 最新一条评论的时间',
`min_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0', `min_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0',
`current_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间', `current_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间',