Minimal subsonic functionality

This commit is contained in:
Connor Johnstone
2026-03-20 20:04:35 -04:00
parent 4fda9071c7
commit 1f983bbecf
4 changed files with 53 additions and 0 deletions
@@ -0,0 +1,35 @@
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(Users::Table)
.add_column(ColumnDef::new(Users::SubsonicPassword).text())
.to_owned(),
)
.await
}
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.alter_table(
Table::alter()
.table(Users::Table)
.drop_column(Users::SubsonicPassword)
.to_owned(),
)
.await
}
}
#[derive(DeriveIden)]
enum Users {
Table,
SubsonicPassword,
}
+2
View File
@@ -13,6 +13,7 @@ mod m20260319_000011_create_users;
mod m20260319_000012_add_user_id_to_wanted_items;
mod m20260320_000013_add_artist_monitoring;
mod m20260320_000014_create_playlists;
mod m20260320_000015_add_subsonic_password;
pub struct Migrator;
@@ -33,6 +34,7 @@ impl MigratorTrait for Migrator {
Box::new(m20260319_000012_add_user_id_to_wanted_items::Migration),
Box::new(m20260320_000013_add_artist_monitoring::Migration),
Box::new(m20260320_000014_create_playlists::Migration),
Box::new(m20260320_000015_add_subsonic_password::Migration),
]
}
}