Closed SeanJOBrien closed 7 years ago
Can you please post the full stack trace? And use the code blocks next time to make your snippet better readable, just edited it for you ;)
And why do you run dbmigrate.run();
instead of usin the programable API methods?
Maybe this already helps you:
Here are example of how to use the programable API:
https://github.com/db-migrate/api-examples/blob/master/promise.js
https://github.com/db-migrate/api-examples/blob/master/index.js
Updated it all to code blocks sorry about that ill give that a go in the morning (dont have the machine on me currently) see if it sorts me i was following the example here
https://db-migrate.readthedocs.io/en/latest/API/programable/
Just need it to run a migration so i can log the errors to file so not doing anything crazy with it for the moment.
@SeanJOBrien Yes, this is referring to calling the default
behavior meaning the cli. Maybe I should adjust also the comment of that example //get an instance and call the standard runtime behavior
as it seems to be confusing.
Anyway the docs for te programable API will improve, I hope I get some time this evening to write the last few lines and examples and push them out.
Running up seems to have solved my original problem but caused another ill see if i can self resolve this and get back to you the run() still wasn't working for me but in this case i don't need it i can work away now thank you for your time.
you also don't want run
;). This starts the cli mode
Hi There,
Not sure if this is a bug or an issue but for the moment lets make it a question, ive got a set up thats working with db-migrate installed locally running in a docker container that is picking up environment variables within the config which is great thank you for that. Once i move from there to trying to insert the module in an application im getting the error "[ERROR] TypeError: Cannot read property 'split' of undefined" My layout is bellow.
Main.js
config/database.json
the Line it portrays to app.js 1150 within db-migrate
Basically Id say ive done something incorrect but the error persists no matter what i try so help would be great.