fixed some unwatch cleanup stuff

This commit is contained in:
Connor Johnstone
2026-03-24 20:41:13 -04:00
parent cc42f8ecbb
commit d9c6a7759e
6 changed files with 104 additions and 12 deletions
@@ -0,0 +1,40 @@
use sea_orm_migration::prelude::*;
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.alter_table(
Table::alter()
.table(Tracks::Table)
.add_column(
ColumnDef::new(Tracks::Tagged)
.boolean()
.not_null()
.default(false),
)
.to_owned(),
)
.await
}
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.alter_table(
Table::alter()
.table(Tracks::Table)
.drop_column(Tracks::Tagged)
.to_owned(),
)
.await
}
}
#[derive(DeriveIden)]
enum Tracks {
Table,
Tagged,
}
+2
View File
@@ -16,6 +16,7 @@ mod m20260320_000014_create_playlists;
mod m20260320_000015_add_subsonic_password;
mod m20260323_000016_remove_orphaned_artists;
mod m20260323_000017_create_work_queue_and_scheduler;
mod m20260324_000018_add_track_tagged;
pub struct Migrator;
@@ -39,6 +40,7 @@ impl MigratorTrait for Migrator {
Box::new(m20260320_000015_add_subsonic_password::Migration),
Box::new(m20260323_000016_remove_orphaned_artists::Migration),
Box::new(m20260323_000017_create_work_queue_and_scheduler::Migration),
Box::new(m20260324_000018_add_track_tagged::Migration),
]
}
}