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

Microservice environment #54

Open
gregorskii opened this issue Nov 27, 2019 · 0 comments
Open

Microservice environment #54

gregorskii opened this issue Nov 27, 2019 · 0 comments

Comments

@gregorskii
Copy link

Migration is a bit wonky when migrations exist on the DB from another microservice and don't exist in the current migration folder.

This is likely an architecture issue on my end as each microservice could have its own database.

The migration goes like this in this case:

Migrate from "APPS" service: Works fine

Migrate from "USERS" service:

root@8a2d067bf04b:/usr/src/app# npm run migrate up create-apps-collection

> app-service@1.0.0 migrate /usr/src/app
> migrate "up" "create-apps-collection"

Synchronizing database with file system migrations...
? The following migrations exist in the migrations folder but not in the database. Select the ones you want to import into the database 1574819499749-create-apps-collection.js
Adding migration /usr/src/app/database/migrations/1574819499749-create-apps-collection.js into database from file system. State is DOWN
UP:    1574819499749-create-apps-collection.js
All migrations finished successfully.

Once you do this it's fine. But it makes it a bit difficult to hit space to accept the migration.

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