From de815fed87ad1022e708b753e9bbccff2b2a3551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Thu, 10 Nov 2022 14:31:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89song=5Fid=E9=83=BD=E6=94=B9?= =?UTF-8?q?=E4=B8=BAbigint(20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netease_music/sql/neteasemusic.sql | 28 +++++++++++++++------------- netease_music/sql/structure.sql | 24 ++++++++++++------------ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/netease_music/sql/neteasemusic.sql b/netease_music/sql/neteasemusic.sql index d87d421..911f8ac 100644 --- a/netease_music/sql/neteasemusic.sql +++ b/netease_music/sql/neteasemusic.sql @@ -11,11 +11,13 @@ Target Server Version : 80012 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'; USE `neteaseMusic`; +*/ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; @@ -25,7 +27,7 @@ SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- DROP TABLE IF EXISTS `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 '专辑名', `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 '专辑简介(全)', @@ -55,7 +57,7 @@ CREATE TABLE `analysis` ( -- ---------------------------- DROP TABLE IF EXISTS `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 '歌手名', `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/ 后面的部分', @@ -91,7 +93,7 @@ CREATE TABLE `comment` ( `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', - `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 '评论内容', `time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '评论时间', `like_count` int(11) NOT NULL COMMENT '点赞数', @@ -108,7 +110,7 @@ CREATE TABLE `comment` ( -- ---------------------------- DROP TABLE IF EXISTS `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 '开始爬取/开始增量爬取的时候 最新一条评论的时间', `min_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0', `current_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间', @@ -137,7 +139,7 @@ CREATE TABLE `log` ( -- ---------------------------- DROP TABLE IF EXISTS `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代表没有数据', `lyric` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '歌词', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', @@ -197,7 +199,7 @@ CREATE TABLE `playlist` ( -- ---------------------------- DROP TABLE IF EXISTS `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 '歌曲名', `type` tinyint(4) NOT NULL COMMENT ' 0: 一般类型 1: 通过云盘上传的音乐,网易云不存在公开对应 2: 通过云盘上传的音乐,网易云存在公开对应', `alias` json NULL COMMENT '歌曲别名(JSON格式数组)', @@ -229,8 +231,8 @@ CREATE TABLE `song` ( -- ---------------------------- DROP TABLE IF EXISTS `song_album_relation`; CREATE TABLE `song_album_relation` ( - `song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', - `album_id` int(10) UNSIGNED NOT NULL COMMENT '专辑id', + `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id', + `album_id` bigint(20) UNSIGNED NOT NULL COMMENT '专辑id', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`song_id`, `album_id`) USING BTREE, @@ -243,8 +245,8 @@ CREATE TABLE `song_album_relation` ( -- ---------------------------- DROP TABLE IF EXISTS `song_artist_relation`; CREATE TABLE `song_artist_relation` ( - `song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', - `artist_id` int(10) UNSIGNED NOT NULL COMMENT '歌手id', + `song_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌曲id', + `artist_id` bigint(20) UNSIGNED NOT NULL COMMENT '歌手id', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`song_id`, `artist_id`) USING BTREE, @@ -257,8 +259,8 @@ CREATE TABLE `song_artist_relation` ( -- ---------------------------- DROP TABLE IF EXISTS `song_playlist_relation`; CREATE TABLE `song_playlist_relation` ( - `song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', - `playlist_id` int(10) UNSIGNED NOT NULL COMMENT '歌单id', + `song_id` bigint(20) 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-删除', `alg` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保留字段', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', diff --git a/netease_music/sql/structure.sql b/netease_music/sql/structure.sql index 67ef2d4..94f9c5f 100644 --- a/netease_music/sql/structure.sql +++ b/netease_music/sql/structure.sql @@ -1,7 +1,7 @@ CREATE DATABASE `neteaseMusic`; USE `neteaseMusic`; 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 '歌曲名', `type` tinyint(4) NOT NULL COMMENT ' 0: 一般类型 1: 通过云盘上传的音乐,网易云不存在公开对应 2: 通过云盘上传的音乐,网易云存在公开对应', `alias` json DEFAULT NULL COMMENT '歌曲别名(JSON格式数组)', @@ -29,7 +29,7 @@ CREATE TABLE `song` ( ); 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 '歌手名', `description` varchar(1500) NOT NULL COMMENT '歌手简介', `image` varchar(200) NOT NULL COMMENT '封面图 http://p1.music.126.net/ 后面的部分', @@ -41,7 +41,7 @@ CREATE TABLE `artist` ( ); 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 '专辑名', `description` varchar(1500) NOT NULL COMMENT '专辑简介', `full_description` text COMMENT '专辑简介(全)', @@ -103,8 +103,8 @@ CREATE TABLE `playlist` ( ); CREATE TABLE `song_playlist_relation` ( - `song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', - `playlist_id` int(10) unsigned NOT NULL COMMENT '歌单id', + `song_id` bigint(20) 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-删除', `alg` varchar(20) DEFAULT NULL COMMENT '保留字段', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', @@ -115,8 +115,8 @@ CREATE TABLE `song_playlist_relation` ( ); CREATE TABLE `song_album_relation` ( - `song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', - `album_id` int(10) unsigned NOT NULL COMMENT '专辑id', + `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id', + `album_id` bigint(20) unsigned NOT NULL COMMENT '专辑id', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`song_id`,`album_id`), @@ -125,8 +125,8 @@ CREATE TABLE `song_album_relation` ( ); CREATE TABLE `song_artist_relation` ( - `song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', - `artist_id` int(10) unsigned NOT NULL COMMENT '歌手id', + `song_id` bigint(20) unsigned NOT NULL COMMENT '歌曲id', + `artist_id` bigint(20) unsigned NOT NULL COMMENT '歌手id', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY `song_id` (`song_id`,`artist_id`), @@ -135,7 +135,7 @@ CREATE TABLE `song_artist_relation` ( ); 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代表没有数据', `lyric` text NOT NULL 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', `parent_comment_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 '评论内容', `time` varchar(50) NOT NULL DEFAULT '' COMMENT '评论时间', `like_count` int(11) NOT NULL COMMENT '点赞数', @@ -172,7 +172,7 @@ CREATE TABLE `comment` ( ); 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 '开始爬取/开始增量爬取的时候 最新一条评论的时间', `min_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0', `current_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间',