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

A possible mongoose cli to try? #8142

Closed
waptik opened this issue Sep 8, 2019 · 5 comments
Closed

A possible mongoose cli to try? #8142

waptik opened this issue Sep 8, 2019 · 5 comments
Milestone

Comments

@waptik
Copy link

waptik commented Sep 8, 2019

Hey! I don't know if i should put this here or not but i am giving it a shot.
A few months ago i was looking for possible mongoose cli packages to help generate my models and seeders for me but couldn't find a suitable one that meets my needs. So i went ahead and built mine which is heavily based on sequelize-cli.

It helps generate models, seeders and migrations(if you need them) files for you from any cli by giving it a name and attributes. Here are:

Please give it a try and give me a feedback.
Thanks 👍

@vkarpov15 vkarpov15 added this to the 5.7.1 milestone Sep 10, 2019
@vkarpov15
Copy link
Collaborator

Nice, thanks! I'll take a look

@waptik
Copy link
Author

waptik commented Sep 11, 2019

Nice, thanks! I'll take a look

Great! Looking forward to your feedback.

@vkarpov15 vkarpov15 modified the milestones: 5.7.1, 5.7.2 Sep 11, 2019
@vkarpov15
Copy link
Collaborator

Nice. I like how your models are structured as functions: https://github.com/waptik/mongoose-cli/blob/master/examples/models/Test.js . For your docs, I'd also add an example with npx like how sequelize cli does.

Also, another suggestion: it's a bit hard to understand how to configure umzug to use mongodbstorage with this cli, and IMO the ability to avoid re-running migrations is a key feature.

@waptik
Copy link
Author

waptik commented Sep 24, 2019

Thanks. I just tested with npx and it's working. So i'll update the docs this Thursday using npx in the instructions.
Umzug's mongodbstorage is only used to store and track migrations (and seeders with tweaks) in the database. but i'm open to suggestions on how best it can be used.

@vkarpov15
Copy link
Collaborator

Maybe my understanding of how people do migrations is limited, but in my experience avoiding re-running migrations is important, and ensuring that people delete migrations is brittle

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

2 participants