# Schema drift

Drift means the live database no longer matches the last snapshot. That can happen after you edit the schema in the studio, or after SQL runs outside a migration. Fakebase notices and wants a file that describes what already happened.

The **Migrations** item in the sidebar shows an amber dot when drift is detected.

## Save as a migration

1. Open **Migrations**. Fakebase prepares a pending file for the drift.
2. Review the SQL. The file is a record of what is already in Postgres — it is not waiting to run again.
3. Choose **Save as migration**. The change is recorded without re-running the SQL.

The status for this file is **Waiting for file save** until you save it.

## Discard instead

If the live change should not stay, choose **Discard changes**. Fakebase can roll the database back. You can also delete the migration file on disk when you discard.

---

## Next steps

- [Migrations](https://fakebase.studio/docs/migrations.md): Keep schema changes as SQL files in your repo, in sync with the database you have open.
- [Apply and review](https://fakebase.studio/docs/apply-migrations.md): Review a pending migration and apply it to the database.
