#[derive(DeriveMigrationName)]
Expand description
The DeriveMigrationName derive macro will implement sea_orm_migration::MigrationName
for a migration.
§Usage
ⓘ
#[derive(DeriveMigrationName)]
pub struct Migration;
The derive macro above will provide following implementation,
given the file name is m20220120_000001_create_post_table.rs
.
ⓘ
impl MigrationName for Migration {
fn name(&self) -> &str {
"m20220120_000001_create_post_table"
}
}