feat: faker cmd for fake test entities
This commit is contained in:
parent
85c9b363f6
commit
52f7ee0990
1 changed files with 6 additions and 0 deletions
|
@ -30,6 +30,9 @@ enum CliCommand {
|
||||||
|
|
||||||
/// apply database migrations
|
/// apply database migrations
|
||||||
Migrate,
|
Migrate,
|
||||||
|
|
||||||
|
/// generate fake user, note and activity
|
||||||
|
Faker,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
@ -55,6 +58,9 @@ async fn main() {
|
||||||
|
|
||||||
CliCommand::Migrate => migrations::Migrator::up(&db, None)
|
CliCommand::Migrate => migrations::Migrator::up(&db, None)
|
||||||
.await.expect("error applying migrations"),
|
.await.expect("error applying migrations"),
|
||||||
|
|
||||||
|
CliCommand::Faker => model::faker(&db)
|
||||||
|
.await.expect("error creating fake entities"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue