New code doesn't migrate old db:
Closed this issue · 2 comments
bbkane commented
$ go run . env list --db-path ~/.config/envelope.db
could not create env service: could not init db: migrate: migration error: name="migrations/001_create.sql" err=migrate file err: txFunc err: SQL logic error: table env already exists (1)
exit status 1
Why is it trying to run this migration? Maybe need to check what's in the table now.
bbkane commented
Ok the issue is that I changed the name of the migrations folder:
┌──────────────────────────────────────┐
│ name │
├──────────────────────────────────────┤
│ embedded_migrations/001_create.sql │
│ embedded_migrations/002_env_ref.sql │
│ embedded_migrations/003_refactor.sql │
└──────────────────────────────────────┘
bbkane commented
And now it's migrations/
instead of embedded_migrations