Skip to content

Export options for auto_increment and DEFINER #2516

Description

@datlechin

Problem

An SQL export writes AUTO_INCREMENT=<n> into CREATE TABLE and a DEFINER= clause into every view, trigger and routine. Both make the file server-specific: the auto-increment value is noise in a schema diff, and the DEFINER names a user that does not exist on the target, so the import fails outright.

Proposed solution

  • An Exclude AUTO_INCREMENT option in the SQL export, on by default for a structure-only export.
  • An Ignore DEFINER option that drops the clause, letting the importing user own the object.
  • Both remembered with the rest of the format's options.

Alternatives considered

sed the dump file afterwards.

Related database type

MySQL / MariaDB

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions