# @platform-modules/i18n-content

## 0.2.0

### Minor Changes

- ee63372: Generate `uuid` and `createdAt`/`updatedAt` column defaults client-side so inserts work on SQLite/D1 as well as Postgres.

  `.defaultRandom()` and `.defaultNow()` declare a *database-side* default, and drizzle inlines that default's SQL into the INSERT. Under the SQLite dialect that emits `values (gen_random_uuid(), …, now())` — neither function exists in SQLite, so every insert into an affected table fails at runtime with `no such function`. On mod-cms, where D1 is the default database, that meant creating a content entry, a revision, a taxonomy term, a form submission, a field value or a translation was impossible; the audit insert failed the same way but is swallowed by `logAudit`, so audit logging silently did nothing.

  The columns now use `$defaultFn` alone. `$defaultFn` binds the value as a parameter from the runtime, which both dialects accept.

  `.defaultRandom().$defaultFn(…)` does **not** work — the SQL default takes precedence and the function never runs. `@platform-modules/i18n-content` carried that combination on `translationValue.id` and was still emitting `gen_random_uuid()`; it is corrected here.

  Hand-written DDL is unchanged, so Postgres columns keep their `DEFAULT gen_random_uuid()` / `DEFAULT now()` and any direct-SQL insert path behaves exactly as before. No package in this repo generates DDL from these schemas.

  One behavioral note at the seam: timestamps now come from the application clock rather than the database clock. Keyset pagination over `createdAt` assumes a monotonic clock, so a writer with backward clock skew can insert a row that sorts behind an already-served page boundary and is not returned by the listing.

### Patch Changes

- Updated dependencies [1fd8651]
  - @platform-modules/db@0.4.0

## 0.1.2

### Patch Changes

- Updated dependencies [df32439]
  - @platform-modules/db@0.3.0

## 0.1.1

### Patch Changes

- 704888e: add markFailed write seam — persists FAILED status for translator-failure rows (SP2 §8.1 store gap)

## 0.1.0

### Minor Changes

- fc33814: Add `@platform-modules/i18n-content` — generic EAV localized-content store keyed `(entityType, entityId, fieldKey, locale)` with a DB languages registry, machine-write protection, STALE-on-read semantics, fallback-to-default locale support, and a single-query `getTranslationsFor` batch read.
