Decide whether the next database migration can run
A version number can match even when a previous migration changed. Check the applied prefix and recorded fingerprints before planning the next step. The two applied versions form an exact prefix with matching fingerprints. Version 5 is ready to apply.
Run the framework with your own input
Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.
git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-bittern.git
cd blyx-bittern
blyxc native-run project.blyx -- "1,2,5" "1,2" "10,20" "10,20" 0API and return values
Returns [can apply next, next available version, pending count, changed fingerprints]. This preflight consumes an exported history and executes no SQL. Invalid input returns an empty vector.
| Argument | Accepted input |
|---|---|
| available | Vector of: nonnegative exact integer |
| applied | Vector of: nonnegative exact integer |
| expected | Vector of: nonnegative exact integer |
| actual | Vector of: nonnegative exact integer |
| dirty | nonnegative exact integer |
Use the libraries independently
The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.
Try the program
Expected output
1 5 1 0
Practice
Change available = [1, 2], applied = [1], expected = [4], actual = [7]. Predict the result, then run the program.
Hint
Returns [can apply next, next available version, pending count, changed fingerprints]. This preflight consumes an exported history and executes no SQL.
Worked solution
The result vector is [0, 2, 1, 1]. Compare its fields with the return layout in the API section.
Find
let available = [1, 2, 5];Replace with
let available = [1, 2];Find
let applied = [1, 2];Replace with
let applied = [1];Find
let expected = [10, 20];Replace with
let expected = [4];Find
let actual = [10, 20];Replace with
let actual = [7];Output after the change
0 2 1 1
