44 lines
942 B
JavaScript
44 lines
942 B
JavaScript
var table = [
|
|
"song",
|
|
"album",
|
|
"artist",
|
|
"comment",
|
|
"lyric",
|
|
"user",
|
|
"category",
|
|
"playlist",
|
|
|
|
"comment_progress",
|
|
"song_album_relation",
|
|
"song_artist_relation",
|
|
"song_playlist_relation",
|
|
|
|
"wait_check_album",
|
|
"wait_check_artist",
|
|
"wait_check_comment",
|
|
"wait_check_lyric",
|
|
"wait_check_song",
|
|
|
|
"wait_fetch_album",
|
|
"wait_fetch_artist",
|
|
"wait_fetch_lyric",
|
|
"wait_fetch_song",
|
|
|
|
"analysis",
|
|
"log",
|
|
|
|
// "hifini_forum",
|
|
// "hifini_tag",
|
|
// "hifini_thread",
|
|
// "hifini_thread_tag_relation",
|
|
];
|
|
|
|
let sqlList = [];
|
|
|
|
// OPTIMIZE TABLE
|
|
table.forEach((tableName) => sqlList.push(`OPTIMIZE TABLE ${tableName};`));
|
|
|
|
// RENAME TABLE 移动数据库
|
|
// table.forEach((tableName) => sqlList.push(`RENAME TABLE neteasemusic.${tableName} TO neteasemusic_develop.${tableName};`));
|
|
|
|
console.log(sqlList.join('\n')); |