From 3c8e9e3674de1014de2a69a6ee0424b86fad63a4 Mon Sep 17 00:00:00 2001 From: ZhenYi <434836402@qq.com> Date: Mon, 20 Apr 2026 16:02:18 +0800 Subject: [PATCH] fix(migrate): use Statement::from_string in down method for SeaORM 2.0 --- libs/migrate/m20260420_000003_add_model_id_to_room_message.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/migrate/m20260420_000003_add_model_id_to_room_message.rs b/libs/migrate/m20260420_000003_add_model_id_to_room_message.rs index ba57388..8460337 100644 --- a/libs/migrate/m20260420_000003_add_model_id_to_room_message.rs +++ b/libs/migrate/m20260420_000003_add_model_id_to_room_message.rs @@ -20,10 +20,10 @@ impl MigrationTrait for Migration { async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager .get_connection() - .execute_raw( + .execute_raw(sea_orm::Statement::from_string( sea_orm::DbBackend::Postgres, "ALTER TABLE room_message DROP COLUMN IF EXISTS model_id;", - ) + )) .await?; Ok(()) }