mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2025-12-19 02:42:58 +05:30
refactor: improved db performance
This commit is contained in:
@@ -148,5 +148,16 @@ pub fn get_migrations() -> Vec<Migration> {
|
||||
END;
|
||||
",
|
||||
kind: MigrationKind::Up,
|
||||
},
|
||||
Migration {
|
||||
version: 3,
|
||||
description: "add_performance_indexes",
|
||||
sql: "
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_video_id ON downloads(video_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_playlist_id ON downloads(playlist_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_status_updated ON downloads(download_status, updated_at DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_id_desc ON downloads(id DESC);
|
||||
",
|
||||
kind: MigrationKind::Up,
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user