Rent v0.8.7
Stronger scoped writes and raw filters, reliable permission grants, and migration fixes.
Bulk writes respect read visibility
Permissioned bulk updates and deletes now require both read access and the applicable write permission. A row hidden from the caller remains unchanged and does not contribute to the affected-row count. This aligns bulk operations with the visibility requirement for single-row writes, including field-specific permissions and application read policies.
Applications that previously relied on a write rule alone for bulk operations should review their read rules. Grant the intended callers explicit read access where appropriate. Existing transaction and hook behavior is retained.
Scoped raw filters preserve row restrictions
Scoped queries and mutations now reject raw SQL fragments that could escape their
expression and bypass tenant or permission restrictions. Unsupported or malformed
fragments return InvalidRawFilter before the filtered statement executes.
Use typed predicates and bound values where possible. Scoped raw syntax rejects
comments, executable-comment markers, NUL, backslash escapes, and trailing SQL
outside the expression. Valid expressions, nested COUNT(*) selectors, and
generated full-text search remain supported. Regenerated full-text helpers use
structured expressions with the same public query methods.
Raw subqueries remain trusted SQL: applications are responsible for restrictions on tables referenced inside them. See query expressions for the raw-filter contract.
PostgreSQL permission fixes
- Direct grants can alternate between expiring and non-expiring values on a reused connection without a prepared-parameter type mismatch. Clearing an expiry works as well.
- Models with more than 50 permission flags can project those flags without exceeding PostgreSQL's JSON function argument limit. Small projections retain their existing SQL shape.
Existing migrations are applied by migrate dev
When migration files already match the schema, rent migrate dev now applies
pending files to an empty or behind-schedule database and verifies the live
schema before reporting readiness. Drift checks, destructive-change approval,
and withheld-deletion safeguards remain in place.
Clearer system-only relationship guidance
The permission reference and system-reference example clarify that explicitly including a system-only model denies the whole request. This differs from omitting ordinary related rows hidden by row permissions. The loading behavior has not changed. See private platform records.
Upgrade
Use v0.8.7 for the CLI and every Rent crate, regenerate each configured client, and commit the application's lockfile. No Rent schema migration is required. Review bulk-write read rules and any scoped raw fragments affected by the stricter syntax contract. Detailed SDK instrumentation remains opt-in.
