Skip to main content

builtin_migrations

Function builtin_migrations 

Source
pub fn builtin_migrations() -> Vec<MigrationSet>
Expand description

The migration sets for every module the admin mounts: the auth schema (users, roles, sessions, access log) and the settings store. Run these before serving router so its built-in screens have their tables, so an application never has to know which framework modules the admin pulls in.

An application with its own modules appends their sets:

let mut migrations = laterite_admin::builtin_migrations();
// migrations.extend([my_module::migrations()]);
laterite_core::migration::run(&db.pool, db.backend, &migrations).await?;