Repository navigation
NERP 1.1.0 makes the server's database code safer and fixes building on Ubuntu. There are no new features and no database changes beyond 1.0.0.
Queries checked at compile time
About 2,750 of the server's database queries are now checked by sqlx against the real database schema while NERP is compiled. A misspelt table or column, a wrong parameter type or a result read into the wrong type now stops the build instead of failing in production. The queries assembled while NERP runs (search filters, user-defined fields) are covered by the test suites, as before.
This changes how NERP is built. The database named in backend/.env (DATABASE_URL) must be migrated before compiling, using the new nerp-migrate program:
cd backend
cargo run --release --bin nerp-migrate # creates or updates the tables
cargo build --release # -> backend/target/release/nerpnerp-migrate builds without a database. The server still applies any pending migrations when it starts, as before.
Fixes
- NERP builds again on Ubuntu 24.04 and other systems with xmlsec 1.2. The workaround for xmlsec 1.3.13 in 1.0.0 broke the SAML sign-on bindings there.
- The test workflow now runs Collabora, so the office-editing suites run in CI instead of skipping.
- Two end-to-end tests no longer fail on Fridays or because of database row order.
Upgrading from 1.0.0
cd /opt/nerp
sudo systemctl start nerp-backup.service # a fresh backup first
sudo -u nerp git pull
sudo -u nerp bash -c 'cd frontend && npm ci && npm run build'
sudo -u nerp bash -lc 'cd backend && ~/.cargo/bin/cargo run --release --bin nerp-migrate'
sudo -u nerp bash -lc 'cd backend && ~/.cargo/bin/cargo build --release'
sudo systemctl restart nerpThe machine that builds NERP needs to reach its PostgreSQL database while compiling. See SETUP.md.