about page
This commit is contained in:
@@ -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)
|
||||
]
|
||||
}
|
||||
|
||||
29
ht_booking/migration/src/m20260516_120000_about.rs
Normal file
29
ht_booking/migration/src/m20260516_120000_about.rs
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user