{"record":{"id":"f8dc783ee92c5c2f","repo":"paperclipai/paperclip","slug":"migration-journal-entry-index-is-missing-a-tag","errorCode":null,"errorMessage":"Migration journal entry ${index} is missing a tag","messagePattern":"Migration journal entry (.+?) is missing a tag","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/db/src/check-migration-numbering.ts","lineNumber":79,"sourceCode":"      );\n    }\n  }\n}\n\nasync function main() {\n  const migrationFiles = (await readdir(migrationsDir))\n    .filter((entry) => entry.endsWith(\".sql\"))\n    .sort();\n\n  ensureNoDuplicates(migrationFiles, \"migration files\");\n  ensureStrictlyOrdered(migrationFiles, \"migration files\");\n\n  const rawJournal = await readFile(journalPath, \"utf8\");\n  const journal = JSON.parse(rawJournal) as JournalFile;\n  const journalTags = (journal.entries ?? [])\n    .map((entry, index) => {\n      if (typeof entry.tag !== \"string\" || entry.tag.length === 0) {\n        throw new Error(`Migration journal entry ${index} is missing a tag`);\n      }\n      return entry.tag;\n    });\n\n  ensureNoDuplicates(journalTags, \"migration journal\");\n  ensureStrictlyOrdered(journalTags, \"migration journal\");\n  ensureJournalMatchesFiles(migrationFiles, journalTags);\n}\n\nawait main();\n","sourceCodeStart":61,"sourceCodeEnd":90,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/db/src/check-migration-numbering.ts#L61-L90","documentation":"Error \"Migration journal entry ${index} is missing a tag\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/db/src/check-migration-numbering.ts:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the missing tag to journal entry ${index} in the migration journal."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}