Browse Source
Two bugs exposed by the integration test workflow:
1. MySQL migration 2022-07-27: groups_users and collections_groups used
UNIQUE instead of PRIMARY KEY. Diesel requires primary keys on all
tables for schema introspection (print-schema). PostgreSQL and SQLite
migrations already used PRIMARY KEY correctly.
2. diesel.toml has [print_schema] configured, so \`diesel migration run\`
rewrites src/db/schema.rs with backend-specific types after running.
This corrupted the checked-in schema before cargo test could compile,
causing E0277 CompatibleType errors for every query. Fix by restoring
the file immediately after each migration run.
pull/6997/head
2 changed files with 13 additions and 5 deletions
Loading…
Reference in new issue