about page
This commit is contained in:
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