Skip to content

Commit 8eb1915

Browse files
committed
no-mistakes(document): Docs updated for the Postgres CHECK/index probe. CHANGELOG and migrations-and-drift.md now say "anywhere" for ;, document @using refusal, and per-table 42501 fallback. Overlong lines reflowed. No unresolved gaps.
1 parent 4f0d040 commit 8eb1915

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,13 @@ here.**
207207
The string normaliser stays, and decides, on SQLite and D1, in the offline `meta migrate`
208208
(which has no database), on a read-only connection or hot standby, for a role without the `TEMP`
209209
privilege, and for an expression that does not compile against the live columns. A probe that
210-
cannot answer never reports drift or fails the command. An expression holding a `;` anywhere, or an
211-
index `@using` that is not a plain access-method name, is never sent to the database; a refusal
212-
for one table (such as no `SELECT` on it) does not stop the other tables being probed. `meta migrate baseline --from-db` now records the
213-
generated text, not Postgres's spelling, for a CHECK or an index expression the live database
214-
proves equal to the metadata's, so the offline plan after a baseline compares like with like; it
215-
is best effort and writes the introspected snapshot as before if the metadata does not load.
210+
cannot answer never reports drift or fails the command. An expression holding a `;` anywhere, or
211+
an index `@using` that is not a plain access-method name, is never sent to the database. A refusal
212+
for one table (such as no `SELECT` on it) gives that table no answer and does not stop the other
213+
tables being probed. `meta migrate baseline --from-db` now records the generated text, not
214+
Postgres's spelling, for a CHECK or an index expression the live database proves equal to the
215+
metadata's, so the offline plan after a baseline compares like with like; it is best effort and
216+
writes the introspected snapshot as before if the metadata does not load.
216217
`meta verify --db` also uses the probe for its committed-snapshot check. New exports from
217218
`@metaobjectsdev/migrate-ts`: `postgresExprCanonProbe`, `adoptGeneratedSpelling` and the
218219
`ExprCanonProbe` types, with a `DiffArgs.exprCanonProbe` option. Schema comparison is

‎docs/features/migrations-and-drift.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,12 @@ Where the question cannot be asked, the comparison falls back to a **string norm
392392
- SQLite and D1, which store the text as written;
393393
- the default **offline** `meta migrate`, which diffs the committed snapshot and has no database;
394394
- a read-only connection or a hot standby, and a role without the `TEMP` privilege;
395+
- a table the role cannot read (no `SELECT` on it, or no `USAGE` on its schema): that table only,
396+
the other tables are still asked;
395397
- an expected expression that does not compile against the live columns (the column diff reports
396398
that case);
397-
- an expression containing a `;` anywhere, quoted or not, or an index `@using` that is not a plain access-method name, which is never sent to the database.
399+
- an expression containing a `;` anywhere, quoted or not, or an index `@using` that is not a plain
400+
access-method name: neither is ever sent to the database.
398401

399402
The normaliser cannot tell a precedence change from a bracket-only change (it deletes every
400403
bracket), so on the fallback path `(a OR b) AND c` and `a OR (b AND c)` compare as equal. A fallback

0 commit comments

Comments
 (0)