@akal/pg-conformance 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -103,7 +103,7 @@ Two conventions, both learned from getting them wrong:
103
103
 
104
104
  **Inherited defaults are `null`, not spelled out.** A column that merely uses the database collation reports `null` rather than `"default"` — otherwise every text column in an unchanged schema reads as different.
105
105
 
106
- The state document is verified to distinguish **every pair of corpus schemas the fingerprint distinguishes** — 4005 pairs, zero misses — so adopting it loses nothing the fingerprint already caught. It is also byte-stable: identical schemas produce identical documents.
106
+ The state document is verified to distinguish **every pair of corpus schemas the fingerprint distinguishes**, so adopting it loses nothing the fingerprint already caught. It is also byte-stable: identical schemas produce identical documents.
107
107
 
108
108
  Existing schema APIs are not a substitute. `information_schema` cannot express a partition bound, identity sequence options, storage, compression or collation, and `postgres-meta` reads `relkind`/`relrowsecurity` but not `relpartbound`, `relpersistence` or `reloptions`, no identity options, and does not model sequences at all.
109
109
 
@@ -121,14 +121,14 @@ Definitions are flattened to one line, because entries are newline-joined and a
121
121
 
122
122
  ## The corpora
123
123
 
124
- | corpus | cases | what it is for |
125
- | --- | --- | --- |
126
- | `objects` | 20 | creating each object kind from an empty schema |
127
- | `hard-cases` | 90 | DDL that is awkward to reproduce — identity options, generated columns, exclusion constraints, partitioning of all three strategies and multi-level, inheritance, collations, storage and TOAST parameters, compression, every index method, interval and range types, domains over domains, function overloads, `INSTEAD OF` and constraint triggers, restrictive policies |
128
- | `ordering` | 12 | dependency ordering, with names chosen to defeat text matching |
129
- | `migrations` | 52 | schema changes a migration tool must make in both directions — enum labels removed or reordered under views, policies and keys; identity, serial and storage changes; generated columns; types and functions created before, and dropped after, what uses them; cross-schema and multi-column foreign keys; objects in other schemas and in quoted ones; overloads, partitions, RLS, triggers, sequences and constraints |
130
- | `equivalences` | 6 | one schema written two ways — as a developer writes it and as PostgreSQL renders it — which a comparison must call identical |
131
- | `data` | 12 | rows a data migration must carry over both ways — text needing quoting, JSON, arrays, binary, numeric extremes, time zones, composite and missing keys, identity and generated columns, enums, domains and other types |
124
+ | corpus | what it is for |
125
+ | --- | --- |
126
+ | `objects` | creating each object kind from an empty schema |
127
+ | `hard-cases` | DDL that is awkward to reproduce — identity options, generated columns, exclusion constraints, partitioning of all three strategies and multi-level, inheritance, collations, storage and TOAST parameters, compression, every index method, interval and range types, domains over domains, function overloads, `INSTEAD OF` and constraint triggers, restrictive policies |
128
+ | `ordering` | dependency ordering, with names chosen to defeat text matching |
129
+ | `migrations` | schema changes a migration tool must make in both directions — enum labels removed or reordered under views, policies and keys; identity, serial and storage changes; generated columns; types and functions created before, and dropped after, what uses them; cross-schema and multi-column foreign keys; objects in other schemas and in quoted ones; overloads, partitions, RLS, triggers, sequences and constraints |
130
+ | `equivalences` | one schema written two ways — as a developer writes it and as PostgreSQL renders it — which a comparison must call identical |
131
+ | `data` | rows a data migration must carry over both ways — text needing quoting, JSON, arrays, binary, numeric extremes, time zones, composite and missing keys, identity and generated columns, enums, domains and other types |
132
132
 
133
133
  `ordering` cases give statements in an order that does **not** apply, plus the precedences any correct order must satisfy — a property rather than one expected permutation, so a sorter's tie-breaking can change without invalidating the case.
134
134
 
@@ -170,21 +170,13 @@ release:
170
170
 
171
171
  Once it reaches `0.1.0`, `^0.1.0` tracks the `0.1.x` line as you would expect.
172
172
 
173
- `0.0.6` renamed the PHP namespace to `Akal\PgConformance`. A breaking change on
174
- `0.x` should raise the minor, and that release was asked to — but the bump
175
- detection read only the first line of the merge commit, which is
176
- `Merge pull request …`, so the marker went unseen and a patch went out. The
177
- detection is fixed; this is recorded because the version number cannot tell that
178
- story on its own, and a reader wondering why a rename sits in a patch deserves
179
- an answer.
180
-
181
173
  Consumers pin through their lockfile as usual; a bot bumps that lockfile, so `npm ci` stays reproducible and still moves.
182
174
 
183
175
  ## Local development
184
176
 
185
177
  ```bash
186
178
  npm link # in this repo
187
- npm link @akal/pg-conformance # in the consumer
179
+ npm link @akal/pg-conformance # in the consumer
188
180
  ```
189
181
 
190
182
  Run the package's own tests against a real server:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akal/pg-conformance",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "A PostgreSQL schema fingerprint and DDL conformance corpus, shared by tools that need to agree on whether two schemas are the same.",
5
5
  "type": "module",
6
6
  "main": "index.js",