# Fix migrate.not_preserved

migrate.not_preserved
Recorded exits: 11 (check). [1]

docs_rev: 6fd264d5335b1cda
applies_to: source at 4aca9a8; agc >=0.3.0
verified: 4aca9a8
Generated from: fix/migrate.not_preserved, data/safe-schema-changes, data/migrations, checks/checks-overview, reference/the-json-envelope, reference/error-code-catalog

## Steps

Cause: A check failed: on your mirror (`check.failed`, `verify.failed`), in a ship's rehearsal (`ship.check_failed`), or `agc migrate` lost data (`migrate.not_preserved`).
Next action: Fix the change, not the check. Change a check only when this change makes it obsolete.
[5]

Cause: `migrate`
Next action: The migrations applied, but they ended the session that checks nothing was lost. / The migrations applied, but ‹broken›: ‹broken›. | A migration must not end other sessions; remove that, then `agc db reset` and `agc migrate`. / Fix the migration (it changed or lost data it should keep), then `agc db reset` and `agc migrate` again. | commands/migrate.ts:99, commands/migrate.ts:108
[6]

## Errors

See the cited canonical pages for errors.

## Not available yet

Availability follows the cited sources; this answer does not establish additional capabilities.

## Sources

[1] [fix/migrate.not_preserved — Reference](/docs/fix/migrate.not_preserved.md#reference) (shipped; source at 4aca9a8; 4aca9a8)
[2] [data/safe-schema-changes — Errors](/docs/data/safe-schema-changes.md#errors) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)
[3] [data/migrations — How it works](/docs/data/migrations.md#how-it-works) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)
[4] [checks/checks-overview — Reference](/docs/checks/checks-overview.md#reference) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)
[5] [reference/the-json-envelope — Exit codes](/docs/reference/the-json-envelope.md#exit-codes) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)
[6] [reference/error-code-catalog — Reference](/docs/reference/error-code-catalog.md#reference) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)

## Known issues

- [data/safe-schema-changes](/docs/data/safe-schema-changes/known-issues.md)
- [data/migrations](/docs/data/migrations/known-issues.md)
- [checks/checks-overview](/docs/checks/checks-overview/known-issues.md)
- [reference/the-json-envelope](/docs/reference/the-json-envelope/known-issues.md)
- [reference/error-code-catalog](/docs/reference/error-code-catalog/known-issues.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "fix/migrate.not_preserved: <what is wrong>; error migrate.not_preserved" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
