risingwave_meta_model_migration/
m20251130_120000_streaming_job_backfill_parallelism.rs1use sea_orm_migration::prelude::*;
2
3#[derive(DeriveMigrationName)]
4pub struct Migration;
5
6#[async_trait::async_trait]
7impl MigrationTrait for Migration {
8 async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
9 manager
10 .alter_table(
11 Table::alter()
12 .table(StreamingJob::Table)
13 .add_column(
14 ColumnDef::new(StreamingJob::BackfillParallelism)
15 .json_binary(), )
17 .to_owned(),
18 )
19 .await
20 }
21
22 async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
23 manager
24 .alter_table(
25 Table::alter()
26 .table(StreamingJob::Table)
27 .drop_column(StreamingJob::BackfillParallelism)
28 .to_owned(),
29 )
30 .await
31 }
32}
33
34#[derive(DeriveIden)]
35enum StreamingJob {
36 Table,
37 BackfillParallelism,
38}