Closed jlpellicer closed 6 years ago
Having the same problem, I think the lib just ignores dbconfig
The config file is only used by the CLI. Any configuration in there also needs to be configured in your application.
Indeed, my configuration pointed to a different table (I had migrations
and gorp_migrations
.
It was a matter of making sure that the dbconfig.yml
had the correct table.
Thanks!
If you want to use the package, you can set the table with this
I started by applying migrations with the CLI, and they went up and the went down.
Then, I integrated the migrations in my app, so that when it starts up, it would apply any pending migrations. It worked, cool.
Now, I tried to take down a migration using the CLI:
>sql-migrate down
Applied 0 migrations
Then asked, still on the CLI:
Is this expected or am I missing something?
This is the
dbconfig.yml
:There is a table in my db called
gorp_migrations
with the two migrations applied.And I am running the commands on the CLI on the same level where the
dbconfig.yml
is.Thank you.