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

Programmatically add compound indexes #164

Open
epicfaace opened this issue Nov 30, 2019 · 0 comments
Open

Programmatically add compound indexes #164

epicfaace opened this issue Nov 30, 2019 · 0 comments

Comments

@epicfaace
Copy link
Member

We've added the following compound indexes through the mlab UI. We need to use .index on the mongoose schemas (https://mongoosejs.com/docs/guide.html#indexes) to add these in programmatically.

This way, if we run this code with another database backend, the indexes will be created automatically.

image

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