# Database

- `database/identities.jadpo_record` is the identity registry. It gives
  every table, column and index a stable identity, so renaming a field
  renames its column instead of dropping it. It records renames, of data
  and code alike ([Stable identity](stable-identity.md)).
  The compiler maintains it, and it is committed and reviewed. It holds
  one sorted entry per line, so two branches that change the schema merge
  readably.
- **Committed generated files share one extension, `.jadpo_record`**, and
  stay next to what they describe: `api/<api>.jadpo_record`,
  `database/identities.jadpo_record`, each `translations/sources.jadpo_record`
  and each installed package's `surface.jadpo_record`. Each is in Jadpo's
  readable format and starts with a line saying what wrote it and which
  command updates it. `jadpo check` regenerates it, and a hand edit is an
  error naming that command. `jadpo.lock` keeps its name. `jadpo records`
  lists them all and flags any that are out of date
  ([What is committed, and why](what-is-committed-and-why.md)).
  Files people write, such as acceptances (a person's recorded acceptance
  of a breaking change, see
  [Acceptances](acceptances.md)), aren't records.
- Each schema change is a folder under `database/migrations/`, named by
  date, time and purpose. It holds your decisions on destructive changes,
  the generated SQL for each database, and any backfill of data written in
  Jadpo. The compiler keeps a record of the latest migration, so history
  stays linear.
- `database/seeds/` holds demonstration and development data for your
  machine.
