working with UI library now

This commit is contained in:
Priec
2026-05-16 14:59:17 +02:00
parent 6006e1e7b1
commit 231b11b8b3
10 changed files with 153 additions and 24 deletions

View File

@@ -5,6 +5,7 @@ mod m20220101_000001_users;
mod m20260515_162423_courts;
mod m20260515_170417_bookings;
mod m20260516_111747_add_title_to_bookings;
pub struct Migrator;
#[async_trait::async_trait]
@@ -14,6 +15,7 @@ impl MigratorTrait for Migrator {
Box::new(m20220101_000001_users::Migration),
Box::new(m20260515_162423_courts::Migration),
Box::new(m20260515_170417_bookings::Migration),
Box::new(m20260516_111747_add_title_to_bookings::Migration),
// inject-above (do not remove this comment)
]
}

View File

@@ -0,0 +1,18 @@
use loco_rs::schema::*;
use sea_orm_migration::prelude::*;
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
async fn up(&self, m: &SchemaManager) -> Result<(), DbErr> {
add_column(m, "bookings", "title", ColType::StringNull).await?;
Ok(())
}
async fn down(&self, m: &SchemaManager) -> Result<(), DbErr> {
remove_column(m, "bookings", "title").await?;
Ok(())
}
}