Description
Trying to seed the database from a fixture that has been generated with cargo loco db seed --dump fails with SQLite database.
To Reproduce
- Generate a new project
- Select SQLite as DB Provider
- Run server
- Add a user with this curl command:
curl -X POST http://localhost:5150/api/auth/register -H "Content-Type: application/json" -d '{"email":"jane.doe@example.com","password":"P@ssw0rd123!","name":"Jane Doe"}'
- Dump DB with
cargo loco db seed --dump
- Reset DB with
cargo loco db reset
- Apply seed with
cargo loco db seed
Output:
cargo loco db seed
2026-01-31T19:34:29.441398Z WARN app: loco_rs::boot: seed: reset=false from=src/fixtures environment=development
Error: DB(Json("premature end of input"))
Expected Behavior
I expect the user to be in the database after seeding, but the seed fails with output: Error: DB(Json("premature end of input")).
Environment:
macOS 26.2
rustc 1.93.0 (254b59607 2026-01-19)
Additional Context
I found an issue that discussed the same error, where jondot concludes its because
The error itself follows from Sqlite requiring a Z to parse properly
Also this more recent comment after confirming the same issue.
Description
Trying to seed the database from a fixture that has been generated with
cargo loco db seed --dumpfails with SQLite database.To Reproduce
curl -X POST http://localhost:5150/api/auth/register -H "Content-Type: application/json" -d '{"email":"jane.doe@example.com","password":"P@ssw0rd123!","name":"Jane Doe"}'cargo loco db seed --dumpcargo loco db resetcargo loco db seedOutput:
cargo loco db seed
2026-01-31T19:34:29.441398Z WARN app: loco_rs::boot: seed: reset=false from=src/fixtures environment=development
Error: DB(Json("premature end of input"))
Expected Behavior
I expect the user to be in the database after seeding, but the seed fails with output: Error: DB(Json("premature end of input")).
Environment:
macOS 26.2
rustc 1.93.0 (254b59607 2026-01-19)
Additional Context
I found an issue that discussed the same error, where jondot concludes its because
Also this more recent comment after confirming the same issue.