Skip to content

migrate dies when parsing files with duplicate timestamps #731

@nickpalmer

Description

@nickpalmer

Describe the Bug
When running migrations that were created with the same timestamp migrate will crash.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Write two migrations with the same timestamp
20220311025833_first.down.sql 
20220311025833_first.up.sql
20220311025833_second.down.sql
20220311025833_second.up.sql
  1. Run migrate with these files

Expected Behavior
The migrations should run in alphabetical order without error

Migrate Version
dev

Loaded Source Drivers
file

Loaded Database Drivers
postgresql, stub, cockroach, cockroachdb, crdb-postgres, postgres

Go Version
go version go1.17.6 darwin/arm64

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