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

up never get's past "Synchronizing database with file system migrations" #67

Closed
chris-aeviator opened this issue Jul 20, 2020 · 1 comment

Comments

@chris-aeviator
Copy link

When setting up migrate-mongoose with a working mongo:// db connection and running migrate up the command will be issued (I can see that it is picking up my migration file by introducing an error into my JS code) but will never get past the point of "Synchronizing database with file system migrations".

This might be related to #6 , but I can see the migrate skript connect to mongo in mongo's logs, I can also see a migration appearing in my DB in the migrations table, it's state stays 'DOWN'.

When running the command with a DEBUG=* prepended, the only thing logged after Synchronizing... is mquery findOne migrations {} { sort: { createdAt: -1 }, projection: {} } +0ms

@chris-aeviator
Copy link
Author

re-reading the example again I can confirm that an additional mongoDB connection in the models/index.js is required. After adding the required mongoose.connect('mongodb://localhost:27017/myDatabaseName', { useNewUrlParser: true }), everything works like expected

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

No branches or pull requests

1 participant