Replace the single-column `<fk table='...' column='...'/>` marker with a
unified, composite-capable format `<fk table='...' columns='local:foreign,...'/>`
and emit full column lists for many-to-many markers, so clients can
reconstruct composite relationships.
- Match every real table relationship a column participates in, instead of
only single-column foreign keys, still preferring tables over the
view-derived relationships.
- Emit the full ordered local->foreign column mapping in the `<fk>` marker
and the full source/target column lists in the `<m2m>` marker.
- Add composite foreign key and composite m2m fixtures plus OpenAPI spec
assertions.
Compute per-row editability and deletability from a table's row-level
security policies and return them as synthetic columns so clients can
hide edit/delete affordances for rows the user cannot change.
- Introspect pg_policies and relrowsecurity at schema-cache load and
combine the UPDATE/DELETE USING qualifiers per table (permissive OR,
restrictive AND).
- Store the combined qualifiers on Table and inject can_edit/can_delete
as computed select fields when expanding `select *`, only for
RLS-enabled tables with a matching policy (COALESCE'd to a boolean).
- Keep the computed columns out of the OpenAPI spec so they are not
rendered as regular fields.
- Add a cfExpression field to CoercibleField to carry raw SQL
expressions through the planner to SqlFragment.
Add unique constraint and many-to-many relationship metadata to the
generated OpenAPI spec so clients can render them.
- Store unique constraints on Table as tableUniqueCols (mirroring
tablePKCols) instead of denormalizing them onto each Column.
- Compute unique constraints via a per-table tbl_unique_cols CTE in
tablesSqlQuery.
- Annotate unique columns and composite unique constraints in property
descriptions, and emit m2m markers in table descriptions.
We had just 3 tests remaining in test_io.py. This commit moves them to
their modules. So we have:
* test_graceful_shutdown.py
* test_zero_downtime.py
* test_pg_internal.py
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
(cherry picked from commit 02d83d1c01)
Upgrade auto-update to 0.2.7 which contains a fix to a bug causing some threads not seeing updates to the cached values.
(cherry picked from commit a2a592a617)
This is to make it easier for users to understand the changes,
much like PostgreSQL does for its changelog: https://www.postgresql.org/docs/19/release-19.html#RELEASE-19-SERVER
(see how they classify "Optimizer", "General Performance", etc).
We classify features, fixes and deprecation in subsections.
Breaking changes are put inside a "Migration to v16" guide.
(cherry picked from commit e3206262d2)
Hiding this will also hide errors when they happen...
In my case, my nix-shell's TMPDIR was too long, so black was failing
silently because it couldn't create a unix socket for its forkserver.