migs
collecting sql scripts since 2026
Usage
use ;
// Register SQL from a file (scope defaults to "init")
migs!;
migs!;
// Register literal SQL inline
migs!;
migs!;
// Collect all registered SQL scripts
let scripts: = collect!;
// Iterate over them
for script in scripts
Features
- Compile-time registration: SQL scripts are registered at compile time using the
migs!macro - File and inline support: Load SQL from files or use inline strings
- Scoped organization: Group migrations by scope (e.g., "init", "seed", "migrate")
- Zero runtime overhead: Uses the
inventorycrate for efficient compile-time collection
License
This project is licensed under a Non-Commercial License with Author Exceptions.
- Non-commercial use is freely permitted (personal, educational, research, etc.)
- Commercial use requires explicit permission from the author (Silen Locatelli)
- See LICENSE.md for full terms
To request a commercial use license or exception, please contact the author through the repository.