Skip to content

Migration change_client_primary_key.mysql.down.sql fails to apply #2790

@grantzvolsky

Description

@grantzvolsky

Describe the bug

The migration contains invalid MySQL. Applying it produces the following error:

Error in query (1064): Syntax error near 'TO pk_tmp' at line 1.

Reproducing the bug

  1. Run make test-resetdb
  2. go run -tags sqlite . migrate sql "mysql://root:secret@(127.0.0.1:3444)/mysql?parseTime=true&multiStatements=true"
  3. Execute ./persistence/sql/migrations/20211004110001000000_change_client_primary_key.mysql.down.sql

Expected behavior

The down migration reverts schema changes without producing an error.

Environment

  • Version: v2.x, 09ac91b
  • Environment: Xubuntu, adminer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions