//! SeaORM migration: add agent_type column to room_ai

use sea_orm_migration::prelude::*;

pub struct Migration;

impl MigrationName for Migration {
    fn name(&self) -> &str {
        "m20260421_000001_add_agent_type_to_room_ai"
    }
}

#[async_trait::async_trait]
impl MigrationTrait for Migration {
    async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
        let sql = include_str!("sql/m20260421_000001_add_agent_type_to_room_ai.sql");
        super::execute_sql(manager, sql).await
    }

    async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
        super::execute_sql(manager, "ALTER TABLE room_ai DROP COLUMN IF EXISTS agent_type;").await
    }
}
