Skip to main content

load_migrations_from_dir

Function load_migrations_from_dir 

Source
pub fn load_migrations_from_dir(dir: &Path) -> Result<Vec<Migration>>
Expand description

Load user migrations from a directory.

Migrations must be named with a zero-padded numeric prefix followed by an underscore and a slug, e.g. 0001_create_users.sql. All migrations in the directory must use the same prefix width, otherwise alphabetic ordering silently desynchronizes from numeric ordering.