Skip to content

sql-migrate status fails if old migration file not found #37

@dtelyukh

Description

@dtelyukh
  1. sql-migrate up
  2. remove sql-file
  3. sql-migrate status
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x40b6be]

goroutine 1 [running]:
panic(0x8b2dc0, 0xc820010140)
        /usr/local/go/src/runtime/panic.go:481 +0x3e6
main.(*StatusCommand).Run(0xe65b08, 0xc82000a590, 0x0, 0x0, 0x9e0490)
        /home/d.telyukh/go/src/github.com/rubenv/sql-migrate/sql-migrate/command_status.go:86 +0x8be
github.com/mitchellh/cli.(*CLI).Run(0xc8203fa000, 0xc82001c450, 0x0, 0x0)
        /home/d.telyukh/go/src/github.com/mitchellh/cli/cli.go:154 +0x56e
main.realMain(0xc820000180)
        /home/d.telyukh/go/src/github.com/rubenv/sql-migrate/sql-migrate/main.go:39 +0x39e
main.main()
        /home/d.telyukh/go/src/github.com/rubenv/sql-migrate/sql-migrate/main.go:11 +0x18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions