feat: expose unique columns and many-to-many markers in OpenAPI
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.
This commit is contained in:
Vendored
+9
@@ -1451,6 +1451,15 @@ create table test.compound_unique(
|
||||
unique(key1, key2)
|
||||
);
|
||||
|
||||
create table test.mixed_unique(
|
||||
id integer not null,
|
||||
key1 integer not null,
|
||||
key2 integer not null,
|
||||
value text,
|
||||
unique(id),
|
||||
unique(key1, key2)
|
||||
);
|
||||
|
||||
create table test.family_tree (
|
||||
id text not null primary key,
|
||||
name text not null,
|
||||
|
||||
Reference in New Issue
Block a user