Minimal subsonic functionality
This commit is contained in:
@@ -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,
|
||||
}
|
||||
@@ -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),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user