Skip to content
What's new

Rent v0.8.19

Maya can share the summary of a post with Ken while keeping the body private. If each section has a key made up of its post ID and a section enum, Rent can grant access to that exact section. The generated client keeps the enum type in the key, filters and permission calls. See the runnable sharing example.

Choose enum storage

Use a closed enum with unit variants as a primary key on its own or as part of a compound key. The default text storage works on PostgreSQL, MySQL, MariaDB and SQLite. Mapped labels keep their declared database values.

On PostgreSQL, use @@rent.native to store the key as a database enum. When using an existing type, match its namespace, type name and labels in the schema. The schema options example shows a native enum key.

Upgrade

Pin the SDK, extension crates and CLI to v0.8.19, regenerate the client and commit your application lockfile. Existing text-backed enums can keep their current storage. To convert an existing column to a native PostgreSQL enum, plan a separate data migration. If you introduce direct grants, review the migration plan for new grant tables before applying it.

See installation and the permission reference.