le-app/directus/schema-differences.md

3.2 KiB

Production versus older schema snapshot

Compared files:

  • Current production evidence: directus/schema.yaml, Directus 12.1.1, MySQL.
  • Older repository snapshot: app/schema.yaml, Directus 11.12.0, MySQL.

The supplied hashes differ. A structural YAML comparison found 36 versus 34 collection entries, 394 versus 379 field entries, and 138 versus 136 relation entries. Neither snapshot was modified.

Meaningful additions

directus_users collection metadata

The current snapshot includes directus_users as a collection with display template {{ username }} ({{ email }}). The older snapshot contains the custom directus_users.username field and relations to the system collection but omits the collection entry itself.

The username field remains a unique nullable varchar(255) at the database layer while Directus metadata marks it required, visible, editable, and searchable. The older snapshot has the same database and required-field characteristics; current metadata additionally contains the Directus 12 searchable property.

user_memberships

Production adds the user_memberships collection with 15 fields:

  • Integer auto-increment primary key: id.
  • Provider/account data: provider, external_user_id, email, username, status, tier.
  • Timing: started_at, renews_at, last_event_at.
  • Claim/support data: claim_token, claim_expires_at, raw.
  • User relations: app_user, claim_user_id.

app_user and claim_user_id are nullable indexed M2O foreign keys to directus_users.id; both use SET NULL on delete and RESTRICT on update. The schema does not mark claim_token unique. Provider choices are Ko-Fi, Patreon, and LMA/Mighty; status choices are active, canceled, refunded, and one-time. These are metadata choices, not database constraints.

Settings raster metadata

The settings_co2gal.raster_settings repeater gained three nested metadata fields: angle (integer), auto (boolean), and increment (integer). These are changes inside the JSON/repeater field definition, not new top-level database columns.

Display metadata

  • settings_co2gal.owner changed from no display renderer to related-values with template {{username}}.
  • bg_entries.scores changed its display formatting template from {{ cat }} to {{ body }}.

Version-generated metadata differences

Most raw differences are serialization changes rather than business-schema changes:

  • All 34 pre-existing collection entries gained meta.autosave_revision_interval: null and meta.status: active.
  • All 379 pre-existing field entries gained meta.searchable: true.

These additions are consistent across the snapshots and correspond to newer snapshot metadata emitted by Directus 12. They do not by themselves show database-column changes.

Unchanged structural areas

  • No older collection, field, or relation key was removed.
  • All 136 relations present in the older snapshot compare equal structurally.
  • The two added relations are the new user_memberships links described above.
  • Database vendor remains MySQL and snapshot format version remains 1.

This comparison is structural and does not compare data, permissions, policies, flows, settings-table values, indexes not represented by the snapshot, extension behavior, or migration history.