Skip to content

(UX) Migration messages push users toward --force and deleting the database #5748

Open

Description

@FXschwartz

Issue for tracking general DB migration UX improvements gathered from the latest v4.0.0 hackathon.

  • Generic abort line. create-migration always ends with aborted. Use --force to ignore warnings, whether the warning is a caveat (unique index on an empty table) or a table drop. The warnings are already tagged destructive in migration.dart, and the "table will be deleted and recreated" text never says rows are lost.
  • Mismatch warning reads backwards. With note_title_idx in the DB and the target wanting note_title_body_idx, the server prints Missing Index "note_title_idx".
  • Hint omits the usual fix. It lists serverpod generate, --apply-migrations and repair migrations, but not serverpod create-migration.
  • No notice on hot reload. Changing a table model while serverpod start runs reloads fine; the failure only appears on the next cold start.

Activity

  1. added
    ux
    on Sep 21, 2026
  2. moved this from Inbox 📫 to Next Up 🎯 in Serverpod Frameworkson Sep 24, 2026
  3. added
    bug
    on Sep 24, 2026
  4. BiAksoy commented on Sep 29, 2026

    @BiAksoy
    Contributor

    The "Mismatch warning reads backwards" point has a second half: the comparison only walks the live table, so a column, index or foreign key the models declare but the database lacks is never reported at all. In the example above, note_title_body_idx never appears in the output. Details and a reproduction in #5797.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugux

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions