mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-07-13 00:21:30 +08:00
feat: 支持解析联合投稿 (#681)
This commit is contained in:
@@ -10,6 +10,7 @@ mod m20250613_043257_add_config;
|
||||
mod m20250712_080013_add_video_created_at_index;
|
||||
mod m20250903_094454_add_rule_and_should_download;
|
||||
mod m20251009_123713_add_use_dynamic_api;
|
||||
mod m20260324_055217_add_staff;
|
||||
|
||||
pub struct Migrator;
|
||||
|
||||
@@ -27,6 +28,7 @@ impl MigratorTrait for Migrator {
|
||||
Box::new(m20250712_080013_add_video_created_at_index::Migration),
|
||||
Box::new(m20250903_094454_add_rule_and_should_download::Migration),
|
||||
Box::new(m20251009_123713_add_use_dynamic_api::Migration),
|
||||
Box::new(m20260324_055217_add_staff::Migration),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
30
crates/bili_sync_migration/src/m20260324_055217_add_staff.rs
Normal file
30
crates/bili_sync_migration/src/m20260324_055217_add_staff.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use sea_orm_migration::prelude::*;
|
||||
use sea_orm_migration::schema::*;
|
||||
|
||||
#[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(Video::Table)
|
||||
.add_column(text_null(Video::Staff))
|
||||
.to_owned(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
manager
|
||||
.alter_table(Table::alter().table(Video::Table).drop_column(Video::Staff).to_owned())
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(DeriveIden)]
|
||||
enum Video {
|
||||
Table,
|
||||
Staff,
|
||||
}
|
||||
Reference in New Issue
Block a user