@klnap/payload-typeid 0.3.0 → 0.3.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 218a64b: Document and test that relationship and version rows reference managed TypeIDs through foreign keys, and state what the database guards cannot stop.
8
+
3
9
  ## 0.3.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -259,7 +259,8 @@ The guards are idempotent and survive a repeated `push`; the test suite runs twi
259
259
 
260
260
  - **PostgreSQL only.** Other adapters log a warning at startup and keep only application-level rules.
261
261
  - **Existing data.** The `CHECK` applies to all rows. If a managed table already holds IDs that do not match, startup fails and no guard is installed. Migrate those rows first (see [Enabling on existing data](#enabling-on-existing-data)).
262
- - **Scope.** Versions tables (`_<table>_v`) and relationship join tables are not guarded; their IDs belong to Payload.
262
+ - **Relations and versions.** Relationship join tables and versions tables are not guarded by triggers. Their references to managed documents are foreign keys to the guarded `id` columns, so a row cannot point at a TypeID that no managed document has. The integration suite checks this for both.
263
+ - **What the database cannot stop.** A superuser can disable triggers or constraints, and `DROP`, `TRUNCATE`, or restoring an old backup bypass every rule. Restrict those privileges to migrations. Other adapters are unguarded (see above).
263
264
  - **Fields.** The guards check only `id`. Other constraints and field rules are not changed.
264
265
 
265
266
  ## Compatibility
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klnap/payload-typeid",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Type-prefixed UUIDv7 primary keys for Payload CMS.",
5
5
  "type": "module",
6
6
  "private": false,