Use -m for migrations, and call the new create_test_users method if -u also present. Also updated the engine.

This commit is contained in:
Relintai 2021-11-14 02:38:29 +01:00
parent 01dbdb6aa1
commit 8cd215e0f1
2 changed files with 7 additions and 2 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"master": "f31e57705f5932c1bd7854c039638ae1f00e677c"}}
{"engine": {"master": "a98480104e1058b4bf0854833379313f91c06195"}}

View File

@ -73,7 +73,7 @@ int main(int argc, char **argv, char **envp) {
app->setup_routes();
app->setup_middleware();
bool migrate = Platform::get_singleton()->arg_parser.has_arg("m");
bool migrate = Platform::get_singleton()->arg_parser.has_arg("-m");
if (!migrate) {
printf("Initialized!\n");
@ -89,6 +89,11 @@ int main(int argc, char **argv, char **envp) {
session_manager->migrate();
user_model->migrate();
if (Platform::get_singleton()->arg_parser.has_arg("-u")) {
printf("Creating test users.\n");
user_model->create_test_users();
}
app->migrate();
}