pub fn list(migrations_dir_name: Option<&str>) -> Result<()>Expand description
Discovers and lists all SQL migration files for inclusion at compile time.
This function should be called in build.rs to generate code that embeds
all migration files into the binary. It scans the specified directory for
.sql files and generates Rust code to include them.
§Arguments
migrations_dir_name- Optional custom directory name (defaults to “migrations”)
§Example
// In build.rs
fn main() {
migrations::list(Some("migrations")).unwrap();
}§Errors
Returns an I/O error if:
- The output directory cannot be written to
- File system operations fail