添加 assistant 助手;其他调整(大调整)
This commit is contained in:
301
netease_music/sql/import/album_bat.txt
Normal file
301
netease_music/sql/import/album_bat.txt
Normal file
@@ -0,0 +1,301 @@
|
||||
@echo off
|
||||
D:
|
||||
cd D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/bin
|
||||
mysql -hlocalhost -uroot -proot neteasemusic
|
||||
use neteasemusic;
|
||||
source D:/sql_export/album/album_0.sql
|
||||
rename table album to album_0000;
|
||||
source D:/sql_export/album/album_1.sql
|
||||
rename table album to album_0001;
|
||||
source D:/sql_export/album/album_2.sql
|
||||
rename table album to album_0002;
|
||||
source D:/sql_export/album/album_3.sql
|
||||
rename table album to album_0003;
|
||||
source D:/sql_export/album/album_4.sql
|
||||
rename table album to album_0004;
|
||||
source D:/sql_export/album/album_5.sql
|
||||
rename table album to album_0005;
|
||||
source D:/sql_export/album/album_6.sql
|
||||
rename table album to album_0006;
|
||||
source D:/sql_export/album/album_7.sql
|
||||
rename table album to album_0007;
|
||||
source D:/sql_export/album/album_8.sql
|
||||
rename table album to album_0008;
|
||||
source D:/sql_export/album/album_9.sql
|
||||
rename table album to album_0009;
|
||||
source D:/sql_export/album/album_10.sql
|
||||
rename table album to album_0010;
|
||||
source D:/sql_export/album/album_11.sql
|
||||
rename table album to album_0011;
|
||||
source D:/sql_export/album/album_12.sql
|
||||
rename table album to album_0012;
|
||||
source D:/sql_export/album/album_13.sql
|
||||
rename table album to album_0013;
|
||||
source D:/sql_export/album/album_14.sql
|
||||
rename table album to album_0014;
|
||||
source D:/sql_export/album/album_15.sql
|
||||
rename table album to album_0015;
|
||||
source D:/sql_export/album/album_16.sql
|
||||
rename table album to album_0016;
|
||||
source D:/sql_export/album/album_17.sql
|
||||
rename table album to album_0017;
|
||||
source D:/sql_export/album/album_18.sql
|
||||
rename table album to album_0018;
|
||||
source D:/sql_export/album/album_19.sql
|
||||
rename table album to album_0019;
|
||||
source D:/sql_export/album/album_20.sql
|
||||
rename table album to album_0020;
|
||||
source D:/sql_export/album/album_21.sql
|
||||
rename table album to album_0021;
|
||||
source D:/sql_export/album/album_22.sql
|
||||
rename table album to album_0022;
|
||||
source D:/sql_export/album/album_23.sql
|
||||
rename table album to album_0023;
|
||||
source D:/sql_export/album/album_24.sql
|
||||
rename table album to album_0024;
|
||||
source D:/sql_export/album/album_25.sql
|
||||
rename table album to album_0025;
|
||||
source D:/sql_export/album/album_26.sql
|
||||
rename table album to album_0026;
|
||||
source D:/sql_export/album/album_27.sql
|
||||
rename table album to album_0027;
|
||||
source D:/sql_export/album/album_28.sql
|
||||
rename table album to album_0028;
|
||||
source D:/sql_export/album/album_29.sql
|
||||
rename table album to album_0029;
|
||||
source D:/sql_export/album/album_30.sql
|
||||
rename table album to album_0030;
|
||||
source D:/sql_export/album/album_31.sql
|
||||
rename table album to album_0031;
|
||||
source D:/sql_export/album/album_32.sql
|
||||
rename table album to album_0032;
|
||||
source D:/sql_export/album/album_33.sql
|
||||
rename table album to album_0033;
|
||||
source D:/sql_export/album/album_34.sql
|
||||
rename table album to album_0034;
|
||||
source D:/sql_export/album/album_35.sql
|
||||
rename table album to album_0035;
|
||||
source D:/sql_export/album/album_36.sql
|
||||
rename table album to album_0036;
|
||||
source D:/sql_export/album/album_37.sql
|
||||
rename table album to album_0037;
|
||||
source D:/sql_export/album/album_38.sql
|
||||
rename table album to album_0038;
|
||||
source D:/sql_export/album/album_39.sql
|
||||
rename table album to album_0039;
|
||||
source D:/sql_export/album/album_40.sql
|
||||
rename table album to album_0040;
|
||||
source D:/sql_export/album/album_41.sql
|
||||
rename table album to album_0041;
|
||||
source D:/sql_export/album/album_42.sql
|
||||
rename table album to album_0042;
|
||||
source D:/sql_export/album/album_43.sql
|
||||
rename table album to album_0043;
|
||||
source D:/sql_export/album/album_44.sql
|
||||
rename table album to album_0044;
|
||||
source D:/sql_export/album/album_45.sql
|
||||
rename table album to album_0045;
|
||||
source D:/sql_export/album/album_46.sql
|
||||
rename table album to album_0046;
|
||||
source D:/sql_export/album/album_47.sql
|
||||
rename table album to album_0047;
|
||||
source D:/sql_export/album/album_48.sql
|
||||
rename table album to album_0048;
|
||||
source D:/sql_export/album/album_49.sql
|
||||
rename table album to album_0049;
|
||||
source D:/sql_export/album/album_50.sql
|
||||
rename table album to album_0050;
|
||||
source D:/sql_export/album/album_51.sql
|
||||
rename table album to album_0051;
|
||||
source D:/sql_export/album/album_52.sql
|
||||
rename table album to album_0052;
|
||||
source D:/sql_export/album/album_53.sql
|
||||
rename table album to album_0053;
|
||||
source D:/sql_export/album/album_54.sql
|
||||
rename table album to album_0054;
|
||||
source D:/sql_export/album/album_55.sql
|
||||
rename table album to album_0055;
|
||||
source D:/sql_export/album/album_56.sql
|
||||
rename table album to album_0056;
|
||||
source D:/sql_export/album/album_57.sql
|
||||
rename table album to album_0057;
|
||||
source D:/sql_export/album/album_58.sql
|
||||
rename table album to album_0058;
|
||||
source D:/sql_export/album/album_59.sql
|
||||
rename table album to album_0059;
|
||||
source D:/sql_export/album/album_60.sql
|
||||
rename table album to album_0060;
|
||||
source D:/sql_export/album/album_61.sql
|
||||
rename table album to album_0061;
|
||||
source D:/sql_export/album/album_62.sql
|
||||
rename table album to album_0062;
|
||||
source D:/sql_export/album/album_63.sql
|
||||
rename table album to album_0063;
|
||||
source D:/sql_export/album/album_64.sql
|
||||
rename table album to album_0064;
|
||||
source D:/sql_export/album/album_65.sql
|
||||
rename table album to album_0065;
|
||||
source D:/sql_export/album/album_66.sql
|
||||
rename table album to album_0066;
|
||||
source D:/sql_export/album/album_67.sql
|
||||
rename table album to album_0067;
|
||||
source D:/sql_export/album/album_68.sql
|
||||
rename table album to album_0068;
|
||||
source D:/sql_export/album/album_69.sql
|
||||
rename table album to album_0069;
|
||||
source D:/sql_export/album/album_70.sql
|
||||
rename table album to album_0070;
|
||||
source D:/sql_export/album/album_71.sql
|
||||
rename table album to album_0071;
|
||||
source D:/sql_export/album/album_72.sql
|
||||
rename table album to album_0072;
|
||||
source D:/sql_export/album/album_73.sql
|
||||
rename table album to album_0073;
|
||||
rename table album_0000 to album;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0001;
|
||||
drop table album_0001;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0002;
|
||||
drop table album_0002;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0003;
|
||||
drop table album_0003;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0004;
|
||||
drop table album_0004;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0005;
|
||||
drop table album_0005;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0006;
|
||||
drop table album_0006;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0007;
|
||||
drop table album_0007;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0008;
|
||||
drop table album_0008;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0009;
|
||||
drop table album_0009;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0010;
|
||||
drop table album_0010;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0011;
|
||||
drop table album_0011;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0012;
|
||||
drop table album_0012;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0013;
|
||||
drop table album_0013;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0014;
|
||||
drop table album_0014;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0015;
|
||||
drop table album_0015;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0016;
|
||||
drop table album_0016;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0017;
|
||||
drop table album_0017;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0018;
|
||||
drop table album_0018;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0019;
|
||||
drop table album_0019;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0020;
|
||||
drop table album_0020;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0021;
|
||||
drop table album_0021;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0022;
|
||||
drop table album_0022;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0023;
|
||||
drop table album_0023;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0024;
|
||||
drop table album_0024;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0025;
|
||||
drop table album_0025;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0026;
|
||||
drop table album_0026;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0027;
|
||||
drop table album_0027;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0028;
|
||||
drop table album_0028;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0029;
|
||||
drop table album_0029;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0030;
|
||||
drop table album_0030;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0031;
|
||||
drop table album_0031;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0032;
|
||||
drop table album_0032;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0033;
|
||||
drop table album_0033;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0034;
|
||||
drop table album_0034;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0035;
|
||||
drop table album_0035;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0036;
|
||||
drop table album_0036;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0037;
|
||||
drop table album_0037;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0038;
|
||||
drop table album_0038;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0039;
|
||||
drop table album_0039;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0040;
|
||||
drop table album_0040;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0041;
|
||||
drop table album_0041;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0042;
|
||||
drop table album_0042;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0043;
|
||||
drop table album_0043;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0044;
|
||||
drop table album_0044;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0045;
|
||||
drop table album_0045;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0046;
|
||||
drop table album_0046;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0047;
|
||||
drop table album_0047;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0048;
|
||||
drop table album_0048;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0049;
|
||||
drop table album_0049;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0050;
|
||||
drop table album_0050;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0051;
|
||||
drop table album_0051;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0052;
|
||||
drop table album_0052;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0053;
|
||||
drop table album_0053;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0054;
|
||||
drop table album_0054;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0055;
|
||||
drop table album_0055;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0056;
|
||||
drop table album_0056;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0057;
|
||||
drop table album_0057;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0058;
|
||||
drop table album_0058;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0059;
|
||||
drop table album_0059;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0060;
|
||||
drop table album_0060;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0061;
|
||||
drop table album_0061;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0062;
|
||||
drop table album_0062;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0063;
|
||||
drop table album_0063;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0064;
|
||||
drop table album_0064;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0065;
|
||||
drop table album_0065;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0066;
|
||||
drop table album_0066;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0067;
|
||||
drop table album_0067;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0068;
|
||||
drop table album_0068;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0069;
|
||||
drop table album_0069;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0070;
|
||||
drop table album_0070;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0071;
|
||||
drop table album_0071;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0072;
|
||||
drop table album_0072;
|
||||
INSERT IGNORE INTO album SELECT * FROM album_0073;
|
||||
drop table album_0073;
|
||||
echo done.
|
22
netease_music/sql/import/artist_bat.txt
Normal file
22
netease_music/sql/import/artist_bat.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
D:
|
||||
cd D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/bin
|
||||
mysql -hlocalhost -uroot -proot neteasemusic
|
||||
use neteasemusic;
|
||||
source D:/sql_export/artist/artist_0000.sql
|
||||
source D:/sql_export/artist/artist_0001.sql
|
||||
source D:/sql_export/artist/artist_0002.sql
|
||||
source D:/sql_export/artist/artist_0003.sql
|
||||
source D:/sql_export/artist/artist_0004.sql
|
||||
source D:/sql_export/artist/artist_0005.sql
|
||||
source D:/sql_export/artist/artist_0006.sql
|
||||
source D:/sql_export/artist/artist_0007.sql
|
||||
source D:/sql_export/artist/artist_0008.sql
|
||||
source D:/sql_export/artist/artist_0009.sql
|
||||
source D:/sql_export/artist/artist_0010.sql
|
||||
source D:/sql_export/artist/artist_0011.sql
|
||||
source D:/sql_export/artist/artist_0012.sql
|
||||
source D:/sql_export/artist/artist_0013.sql
|
||||
source D:/sql_export/artist/artist_0014.sql
|
||||
source D:/sql_export/artist/artist_0015.sql
|
||||
echo done.
|
@@ -1,3 +1,6 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const absPath = `D:/sql_export`;
|
||||
|
||||
// 数字转成字符串,同时在前面填充
|
||||
@@ -18,9 +21,24 @@ let outputArr = [
|
||||
];
|
||||
|
||||
let firstIndex = 0;
|
||||
let lastIndex = 115;
|
||||
let lastIndex = 15;
|
||||
let tableName = "song_artist_relation";
|
||||
let isContainDropTable = false; // 如果 mysqldump的时候导出的文件包含了drop table if exists,那么就先分别导入不同表,然后再将数据合并到一张表中
|
||||
let fileNameSerialFillZero = true;
|
||||
for (let i = firstIndex; i <= lastIndex; i++) {
|
||||
outputArr.push(`source ${absPath}/comment/comment_${fill(i, '0', 4)}.sql`);
|
||||
outputArr.push(`source ${absPath}/${tableName}/${tableName}_${fileNameSerialFillZero ? fill(i, '0', 4) : i}.sql`);
|
||||
|
||||
if (isContainDropTable) {
|
||||
outputArr.push(`rename table ${tableName} to ${tableName}_${fill(i, '0', 4)};`);
|
||||
}
|
||||
}
|
||||
if (isContainDropTable) {
|
||||
outputArr.push(`rename table ${tableName}_${fill(firstIndex, '0', 4)} to ${tableName};`);
|
||||
for (let i = firstIndex + 1; i <= lastIndex; i++) {
|
||||
outputArr.push(`INSERT IGNORE INTO ${tableName} SELECT * FROM ${tableName}_${fill(i, '0', 4)};`);
|
||||
outputArr.push(`drop table ${tableName}_${fill(i, '0', 4)};`);
|
||||
}
|
||||
}
|
||||
outputArr.push("echo done.");
|
||||
console.log(outputArr.join('\n'));
|
||||
fs.writeFileSync(path.join(__dirname, `${tableName}_bat.txt`), outputArr.join('\n'));
|
76
netease_music/sql/import/lyric_bat.txt
Normal file
76
netease_music/sql/import/lyric_bat.txt
Normal file
@@ -0,0 +1,76 @@
|
||||
@echo off
|
||||
D:
|
||||
cd D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/bin
|
||||
mysql -hlocalhost -uroot -proot neteasemusic
|
||||
use neteasemusic;
|
||||
source D:/sql_export/lyric/lyric_0000.sql
|
||||
source D:/sql_export/lyric/lyric_0001.sql
|
||||
source D:/sql_export/lyric/lyric_0002.sql
|
||||
source D:/sql_export/lyric/lyric_0003.sql
|
||||
source D:/sql_export/lyric/lyric_0004.sql
|
||||
source D:/sql_export/lyric/lyric_0005.sql
|
||||
source D:/sql_export/lyric/lyric_0006.sql
|
||||
source D:/sql_export/lyric/lyric_0007.sql
|
||||
source D:/sql_export/lyric/lyric_0008.sql
|
||||
source D:/sql_export/lyric/lyric_0009.sql
|
||||
source D:/sql_export/lyric/lyric_0010.sql
|
||||
source D:/sql_export/lyric/lyric_0011.sql
|
||||
source D:/sql_export/lyric/lyric_0012.sql
|
||||
source D:/sql_export/lyric/lyric_0013.sql
|
||||
source D:/sql_export/lyric/lyric_0014.sql
|
||||
source D:/sql_export/lyric/lyric_0015.sql
|
||||
source D:/sql_export/lyric/lyric_0016.sql
|
||||
source D:/sql_export/lyric/lyric_0017.sql
|
||||
source D:/sql_export/lyric/lyric_0018.sql
|
||||
source D:/sql_export/lyric/lyric_0019.sql
|
||||
source D:/sql_export/lyric/lyric_0020.sql
|
||||
source D:/sql_export/lyric/lyric_0021.sql
|
||||
source D:/sql_export/lyric/lyric_0022.sql
|
||||
source D:/sql_export/lyric/lyric_0023.sql
|
||||
source D:/sql_export/lyric/lyric_0024.sql
|
||||
source D:/sql_export/lyric/lyric_0025.sql
|
||||
source D:/sql_export/lyric/lyric_0026.sql
|
||||
source D:/sql_export/lyric/lyric_0027.sql
|
||||
source D:/sql_export/lyric/lyric_0028.sql
|
||||
source D:/sql_export/lyric/lyric_0029.sql
|
||||
source D:/sql_export/lyric/lyric_0030.sql
|
||||
source D:/sql_export/lyric/lyric_0031.sql
|
||||
source D:/sql_export/lyric/lyric_0032.sql
|
||||
source D:/sql_export/lyric/lyric_0033.sql
|
||||
source D:/sql_export/lyric/lyric_0034.sql
|
||||
source D:/sql_export/lyric/lyric_0035.sql
|
||||
source D:/sql_export/lyric/lyric_0036.sql
|
||||
source D:/sql_export/lyric/lyric_0037.sql
|
||||
source D:/sql_export/lyric/lyric_0038.sql
|
||||
source D:/sql_export/lyric/lyric_0039.sql
|
||||
source D:/sql_export/lyric/lyric_0040.sql
|
||||
source D:/sql_export/lyric/lyric_0041.sql
|
||||
source D:/sql_export/lyric/lyric_0042.sql
|
||||
source D:/sql_export/lyric/lyric_0043.sql
|
||||
source D:/sql_export/lyric/lyric_0044.sql
|
||||
source D:/sql_export/lyric/lyric_0045.sql
|
||||
source D:/sql_export/lyric/lyric_0046.sql
|
||||
source D:/sql_export/lyric/lyric_0047.sql
|
||||
source D:/sql_export/lyric/lyric_0048.sql
|
||||
source D:/sql_export/lyric/lyric_0049.sql
|
||||
source D:/sql_export/lyric/lyric_0050.sql
|
||||
source D:/sql_export/lyric/lyric_0051.sql
|
||||
source D:/sql_export/lyric/lyric_0052.sql
|
||||
source D:/sql_export/lyric/lyric_0053.sql
|
||||
source D:/sql_export/lyric/lyric_0054.sql
|
||||
source D:/sql_export/lyric/lyric_0055.sql
|
||||
source D:/sql_export/lyric/lyric_0056.sql
|
||||
source D:/sql_export/lyric/lyric_0057.sql
|
||||
source D:/sql_export/lyric/lyric_0058.sql
|
||||
source D:/sql_export/lyric/lyric_0059.sql
|
||||
source D:/sql_export/lyric/lyric_0060.sql
|
||||
source D:/sql_export/lyric/lyric_0061.sql
|
||||
source D:/sql_export/lyric/lyric_0062.sql
|
||||
source D:/sql_export/lyric/lyric_0063.sql
|
||||
source D:/sql_export/lyric/lyric_0064.sql
|
||||
source D:/sql_export/lyric/lyric_0065.sql
|
||||
source D:/sql_export/lyric/lyric_0066.sql
|
||||
source D:/sql_export/lyric/lyric_0067.sql
|
||||
source D:/sql_export/lyric/lyric_0068.sql
|
||||
source D:/sql_export/lyric/lyric_0069.sql
|
||||
echo done.
|
22
netease_music/sql/import/song_artist_relation_bat.txt
Normal file
22
netease_music/sql/import/song_artist_relation_bat.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
D:
|
||||
cd D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/bin
|
||||
mysql -hlocalhost -uroot -proot neteasemusic
|
||||
use neteasemusic;
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0000.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0001.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0002.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0003.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0004.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0005.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0006.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0007.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0008.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0009.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0010.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0011.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0012.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0013.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0014.sql
|
||||
source D:/sql_export/song_artist_relation/song_artist_relation_0015.sql
|
||||
echo done.
|
285
netease_music/sql/import/song_bat.txt
Normal file
285
netease_music/sql/import/song_bat.txt
Normal file
@@ -0,0 +1,285 @@
|
||||
@echo off
|
||||
D:
|
||||
cd D:/Program/Development/Environment/phpstudy_pro/Extensions/MySQL8.0.12/bin
|
||||
mysql -hlocalhost -uroot -proot neteasemusic
|
||||
use neteasemusic;
|
||||
source D:/sql_export/song/song_0.sql
|
||||
rename table song to song_0000;
|
||||
source D:/sql_export/song/song_1.sql
|
||||
rename table song to song_0001;
|
||||
source D:/sql_export/song/song_2.sql
|
||||
rename table song to song_0002;
|
||||
source D:/sql_export/song/song_3.sql
|
||||
rename table song to song_0003;
|
||||
source D:/sql_export/song/song_4.sql
|
||||
rename table song to song_0004;
|
||||
source D:/sql_export/song/song_5.sql
|
||||
rename table song to song_0005;
|
||||
source D:/sql_export/song/song_6.sql
|
||||
rename table song to song_0006;
|
||||
source D:/sql_export/song/song_7.sql
|
||||
rename table song to song_0007;
|
||||
source D:/sql_export/song/song_8.sql
|
||||
rename table song to song_0008;
|
||||
source D:/sql_export/song/song_9.sql
|
||||
rename table song to song_0009;
|
||||
source D:/sql_export/song/song_10.sql
|
||||
rename table song to song_0010;
|
||||
source D:/sql_export/song/song_11.sql
|
||||
rename table song to song_0011;
|
||||
source D:/sql_export/song/song_12.sql
|
||||
rename table song to song_0012;
|
||||
source D:/sql_export/song/song_13.sql
|
||||
rename table song to song_0013;
|
||||
source D:/sql_export/song/song_14.sql
|
||||
rename table song to song_0014;
|
||||
source D:/sql_export/song/song_15.sql
|
||||
rename table song to song_0015;
|
||||
source D:/sql_export/song/song_16.sql
|
||||
rename table song to song_0016;
|
||||
source D:/sql_export/song/song_17.sql
|
||||
rename table song to song_0017;
|
||||
source D:/sql_export/song/song_18.sql
|
||||
rename table song to song_0018;
|
||||
source D:/sql_export/song/song_19.sql
|
||||
rename table song to song_0019;
|
||||
source D:/sql_export/song/song_20.sql
|
||||
rename table song to song_0020;
|
||||
source D:/sql_export/song/song_21.sql
|
||||
rename table song to song_0021;
|
||||
source D:/sql_export/song/song_22.sql
|
||||
rename table song to song_0022;
|
||||
source D:/sql_export/song/song_23.sql
|
||||
rename table song to song_0023;
|
||||
source D:/sql_export/song/song_24.sql
|
||||
rename table song to song_0024;
|
||||
source D:/sql_export/song/song_25.sql
|
||||
rename table song to song_0025;
|
||||
source D:/sql_export/song/song_26.sql
|
||||
rename table song to song_0026;
|
||||
source D:/sql_export/song/song_27.sql
|
||||
rename table song to song_0027;
|
||||
source D:/sql_export/song/song_28.sql
|
||||
rename table song to song_0028;
|
||||
source D:/sql_export/song/song_29.sql
|
||||
rename table song to song_0029;
|
||||
source D:/sql_export/song/song_30.sql
|
||||
rename table song to song_0030;
|
||||
source D:/sql_export/song/song_31.sql
|
||||
rename table song to song_0031;
|
||||
source D:/sql_export/song/song_32.sql
|
||||
rename table song to song_0032;
|
||||
source D:/sql_export/song/song_33.sql
|
||||
rename table song to song_0033;
|
||||
source D:/sql_export/song/song_34.sql
|
||||
rename table song to song_0034;
|
||||
source D:/sql_export/song/song_35.sql
|
||||
rename table song to song_0035;
|
||||
source D:/sql_export/song/song_36.sql
|
||||
rename table song to song_0036;
|
||||
source D:/sql_export/song/song_37.sql
|
||||
rename table song to song_0037;
|
||||
source D:/sql_export/song/song_38.sql
|
||||
rename table song to song_0038;
|
||||
source D:/sql_export/song/song_39.sql
|
||||
rename table song to song_0039;
|
||||
source D:/sql_export/song/song_40.sql
|
||||
rename table song to song_0040;
|
||||
source D:/sql_export/song/song_41.sql
|
||||
rename table song to song_0041;
|
||||
source D:/sql_export/song/song_42.sql
|
||||
rename table song to song_0042;
|
||||
source D:/sql_export/song/song_43.sql
|
||||
rename table song to song_0043;
|
||||
source D:/sql_export/song/song_44.sql
|
||||
rename table song to song_0044;
|
||||
source D:/sql_export/song/song_45.sql
|
||||
rename table song to song_0045;
|
||||
source D:/sql_export/song/song_46.sql
|
||||
rename table song to song_0046;
|
||||
source D:/sql_export/song/song_47.sql
|
||||
rename table song to song_0047;
|
||||
source D:/sql_export/song/song_48.sql
|
||||
rename table song to song_0048;
|
||||
source D:/sql_export/song/song_49.sql
|
||||
rename table song to song_0049;
|
||||
source D:/sql_export/song/song_50.sql
|
||||
rename table song to song_0050;
|
||||
source D:/sql_export/song/song_51.sql
|
||||
rename table song to song_0051;
|
||||
source D:/sql_export/song/song_52.sql
|
||||
rename table song to song_0052;
|
||||
source D:/sql_export/song/song_53.sql
|
||||
rename table song to song_0053;
|
||||
source D:/sql_export/song/song_54.sql
|
||||
rename table song to song_0054;
|
||||
source D:/sql_export/song/song_55.sql
|
||||
rename table song to song_0055;
|
||||
source D:/sql_export/song/song_56.sql
|
||||
rename table song to song_0056;
|
||||
source D:/sql_export/song/song_57.sql
|
||||
rename table song to song_0057;
|
||||
source D:/sql_export/song/song_58.sql
|
||||
rename table song to song_0058;
|
||||
source D:/sql_export/song/song_59.sql
|
||||
rename table song to song_0059;
|
||||
source D:/sql_export/song/song_60.sql
|
||||
rename table song to song_0060;
|
||||
source D:/sql_export/song/song_61.sql
|
||||
rename table song to song_0061;
|
||||
source D:/sql_export/song/song_62.sql
|
||||
rename table song to song_0062;
|
||||
source D:/sql_export/song/song_63.sql
|
||||
rename table song to song_0063;
|
||||
source D:/sql_export/song/song_64.sql
|
||||
rename table song to song_0064;
|
||||
source D:/sql_export/song/song_65.sql
|
||||
rename table song to song_0065;
|
||||
source D:/sql_export/song/song_66.sql
|
||||
rename table song to song_0066;
|
||||
source D:/sql_export/song/song_67.sql
|
||||
rename table song to song_0067;
|
||||
source D:/sql_export/song/song_68.sql
|
||||
rename table song to song_0068;
|
||||
source D:/sql_export/song/song_69.sql
|
||||
rename table song to song_0069;
|
||||
rename table song_0000 to song;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0001;
|
||||
drop table song_0001;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0002;
|
||||
drop table song_0002;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0003;
|
||||
drop table song_0003;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0004;
|
||||
drop table song_0004;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0005;
|
||||
drop table song_0005;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0006;
|
||||
drop table song_0006;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0007;
|
||||
drop table song_0007;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0008;
|
||||
drop table song_0008;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0009;
|
||||
drop table song_0009;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0010;
|
||||
drop table song_0010;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0011;
|
||||
drop table song_0011;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0012;
|
||||
drop table song_0012;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0013;
|
||||
drop table song_0013;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0014;
|
||||
drop table song_0014;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0015;
|
||||
drop table song_0015;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0016;
|
||||
drop table song_0016;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0017;
|
||||
drop table song_0017;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0018;
|
||||
drop table song_0018;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0019;
|
||||
drop table song_0019;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0020;
|
||||
drop table song_0020;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0021;
|
||||
drop table song_0021;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0022;
|
||||
drop table song_0022;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0023;
|
||||
drop table song_0023;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0024;
|
||||
drop table song_0024;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0025;
|
||||
drop table song_0025;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0026;
|
||||
drop table song_0026;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0027;
|
||||
drop table song_0027;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0028;
|
||||
drop table song_0028;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0029;
|
||||
drop table song_0029;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0030;
|
||||
drop table song_0030;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0031;
|
||||
drop table song_0031;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0032;
|
||||
drop table song_0032;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0033;
|
||||
drop table song_0033;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0034;
|
||||
drop table song_0034;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0035;
|
||||
drop table song_0035;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0036;
|
||||
drop table song_0036;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0037;
|
||||
drop table song_0037;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0038;
|
||||
drop table song_0038;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0039;
|
||||
drop table song_0039;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0040;
|
||||
drop table song_0040;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0041;
|
||||
drop table song_0041;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0042;
|
||||
drop table song_0042;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0043;
|
||||
drop table song_0043;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0044;
|
||||
drop table song_0044;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0045;
|
||||
drop table song_0045;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0046;
|
||||
drop table song_0046;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0047;
|
||||
drop table song_0047;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0048;
|
||||
drop table song_0048;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0049;
|
||||
drop table song_0049;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0050;
|
||||
drop table song_0050;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0051;
|
||||
drop table song_0051;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0052;
|
||||
drop table song_0052;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0053;
|
||||
drop table song_0053;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0054;
|
||||
drop table song_0054;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0055;
|
||||
drop table song_0055;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0056;
|
||||
drop table song_0056;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0057;
|
||||
drop table song_0057;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0058;
|
||||
drop table song_0058;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0059;
|
||||
drop table song_0059;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0060;
|
||||
drop table song_0060;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0061;
|
||||
drop table song_0061;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0062;
|
||||
drop table song_0062;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0063;
|
||||
drop table song_0063;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0064;
|
||||
drop table song_0064;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0065;
|
||||
drop table song_0065;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0066;
|
||||
drop table song_0066;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0067;
|
||||
drop table song_0067;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0068;
|
||||
drop table song_0068;
|
||||
INSERT IGNORE INTO song SELECT * FROM song_0069;
|
||||
drop table song_0069;
|
||||
echo done.
|
@@ -19,12 +19,13 @@ INSERT INTO analysis (`key`, `value`) VALUES ('songArtistCount', (SELECT count(*
|
||||
|
||||
|
||||
-- 更新后初次全表扫描
|
||||
INSERT IGNORE INTO wait_song (song_id) SELECT song_id FROM song_artist_relation WHERE song_id NOT IN ( SELECT song_id FROM song )
|
||||
INSERT IGNORE INTO wait_song (song_id) SELECT song_id FROM song_album_relation WHERE song_id NOT IN ( SELECT song_id FROM song )
|
||||
INSERT IGNORE INTO wait_song (song_id) SELECT song_id FROM song_playlist_relation WHERE song_id NOT IN ( SELECT song_id FROM song )
|
||||
|
||||
-- 后续只需要扫描 wait_check 表
|
||||
INSERT IGNORE INTO wait_song (song_id) SELECT song_id FROM wait_check_song WHERE song_id NOT IN ( SELECT song_id FROM song )
|
||||
INSERT IGNORE INTO wait_check_song (id) SELECT song_id FROM song_artist_relation WHERE song_id NOT IN ( SELECT song_id FROM song );
|
||||
INSERT IGNORE INTO wait_check_song (id) SELECT song_id FROM song_album_relation WHERE song_id NOT IN ( SELECT song_id FROM song );
|
||||
INSERT IGNORE INTO wait_check_song (id) SELECT song_id FROM song_playlist_relation WHERE song_id NOT IN ( SELECT song_id FROM song );
|
||||
INSERT IGNORE INTO wait_check_lyric (id) SELECT song_id FROM song WHERE song_id NOT IN ( SELECT song_id FROM lyric );
|
||||
INSERT IGNORE INTO wait_check_comment (id) SELECT song_id FROM song WHERE song_id NOT IN ( SELECT song_id FROM comment_progress );
|
||||
INSERT IGNORE INTO wait_check_artist (id) SELECT artist_id FROM song_artist_relation WHERE artist_id NOT IN ( SELECT artist_id FROM artist );
|
||||
INSERT IGNORE INTO wait_check_album (id) SELECT album_id FROM song_album_relation WHERE album_id NOT IN ( SELECT album_id FROM album );
|
||||
|
||||
|
||||
|
||||
|
@@ -233,6 +233,11 @@ CREATE TABLE `wait_check_lyric` (
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `wait_check_comment` (
|
||||
`id` bigint(20) unsigned NOT NULL COMMENT 'id',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE `wait_fetch_song` (
|
||||
|
Reference in New Issue
Block a user