Skip to content

Sync panics on sqlite named foreign key #3132

Description

@berniev

2.0.0-rc.41 (.42 is not usable for me, forget why)

If a foreign key has a name (not anonymous) sync panics, providing no context (e.g. which table, which key).

If I manually set a FK to have a name sync fails. Remove the name and it seems ok.
Default behaviour for FK generation in tools is to make a name. I think this is expected behaviour.

Activity

  1. added theissue type on Jul 12, 2026
  2. berniev commented on Jul 15, 2026

    @berniev
    Author

    I am finding usage very fragile.

    The critical issue (mentioned above also) is panics from unexpected situations in sync code. Debug is a PITA.

    When a table is altered via the RustRover built-in sql facility to match an alteration made in sea_orm I often get panics. Dropping the table and letting sync regenerate it works, but as the database evolves this wastes test data.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions