540871a8cdc2c7df89bd3c0f5eb39387359db062 / migration / src / m20261030_000037_add_updated_at_to_ap_notes.rs
Raw
// SPDX-FileCopyrightText: 2026 Ololduck <ololduck@vit.am> and contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
use sea_orm_migration::prelude::*;
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.get_connection()
.execute_unprepared(
r#"
ALTER TABLE ap_notes ADD COLUMN updated_at TIMESTAMP WITH TIME ZONE;
"#,
)
.await?;
Ok(())
}
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.get_connection()
.execute_unprepared(
r#"
ALTER TABLE ap_notes DROP COLUMN updated_at;
"#,
)
.await?;
Ok(())
}
}