about page

This commit is contained in:
Priec
2026-05-16 21:46:02 +02:00
parent 78c2430d21
commit 4938314889
16 changed files with 348 additions and 6 deletions

View File

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

View File

@@ -0,0 +1,29 @@
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> {
create_table(m, "abouts",
&[
("id", ColType::PkAuto),
("title", ColType::StringNull),
("body", ColType::TextNull),
("address", ColType::TextNull),
("phone", ColType::StringNull),
("email", ColType::StringNull),
],
&[
]
).await
}
async fn down(&self, m: &SchemaManager) -> Result<(), DbErr> {
drop_table(m, "abouts").await
}
}