{
  "slug": "sqlite-autoincrement",
  "term": "SQLite AUTOINCREMENT",
  "aliases": [],
  "definition": "SQLite AUTOINCREMENT is an INTEGER PRIMARY KEY modifier that makes automatic allocation exceed the committed identifier history recorded for that table.",
  "note": "SQLite records this history in sqlite_sequence. The modifier avoids automatic reuse of previously committed identifiers in that history, but does not promise gapless numbering; rolled-back allocations can be reused. Its extra work is unnecessary when those properties are not required. [identity-autoinc]\n\nRestoring an older backup also restores its older allocation history. In Hesela's fixture, a backup at sequence 1 preceded committed ID 2 for beta. The restored copy then assigned 2 to delta, including with AUTOINCREMENT. This is a controlled recovery observation, not an allocator defect or a collision-rate estimate. [evidence] [receipt]\n\nA separate deletion control allocated 3 with AUTOINCREMENT and reused 2 without it. Reconciliation of IDs already issued to external systems is therefore a recovery requirement that adding this modifier alone cannot satisfy. [evidence]",
  "related": [
    "sqlite-rowid",
    "sqlite-online-backup",
    "restore-test",
    "backup-verification"
  ],
  "citations": [
    {
      "id": "identity-autoinc",
      "title": "SQLite: AUTOINCREMENT, committed history and sqlite_sequence",
      "url": "https://www.sqlite.org/autoinc.html",
      "accessed": "2026-10-18"
    },
    {
      "id": "evidence",
      "title": "Hesela: measured SQLite row identity across copying and history rollback",
      "url": "https://hesela.com/analyses/backup-verification-is-not-a-restore-test/#sqlite-row-identity",
      "accessed": "2026-10-18"
    },
    {
      "id": "receipt",
      "title": "Hesela: twelve designed SQLite identity cases, full observations and source hash",
      "url": "https://hesela.dev/research/sqlite-identity/results.json",
      "accessed": "2026-10-18"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-18"
}
