risingwave_meta_model_migration/
m20241226_074013_clean_watermark_index_in_pk.rs1use sea_orm_migration::prelude::{Table as MigrationTable, *};
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
11 .alter_table(
12 MigrationTable::alter()
13 .table(Table::Table)
14 .add_column(ColumnDef::new(Table::CleanWatermarkIndexInPk).integer())
15 .to_owned(),
16 )
17 .await
18 }
19
20 async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
21 manager
23 .alter_table(
24 MigrationTable::alter()
25 .table(Table::Table)
26 .drop_column(Table::CleanWatermarkIndexInPk)
27 .to_owned(),
28 )
29 .await
30 }
31}
32
33#[derive(DeriveIden)]
34enum Table {
35 Table,
36 CleanWatermarkIndexInPk,
37}