Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dtelyukh opened this issue Sep 16, 2016 · 1 comment · May be fixed by #44
Open

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

dtelyukh opened this issue Sep 16, 2016 · 1 comment · May be fixed by #44

Comments

@dtelyukh
Copy link

  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
@dtelyukh
Copy link
Author

And sql-migrate up doesn't apply any new migrations when old files not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant