-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fill the database with sample data on startup #3
Comments
Maybe with something like Liquibase, but not sure about its NoSQL support, see https://forum.liquibase.org/t/extending-liquibase-to-support-nosql-databases/2106/8 |
Hi, can i try this one ? |
Sure, what do you wanna use? |
I wanna use Mongock. Could you also assign me and add hacktoberfest label please ? |
Ok, so it's only for MongoDB, why not. What's that label, I am not sure, if we need all those labels or is there a benefit like getting something by GitHub if we do that? |
Its event on GitHub during October, and lets users win prizes by doing PR to Open Source so there is chance that more people will help with your project. Hactoberfest info |
Ok if we can win something why not, but October is almost over, do you think you'd still qualify or have something to show before the end of next week?O;-) |
@Tegridy It does not really matter adding it here, but you should add the "hacktoberfest" label to a PR which needs to come in and be merged before Oct 31. |
Yes, I came up only with Spring+Mongo solution because i don't know the other frameworks so sorry if it is a problem. |
@Tegridy Unfortunately mocking is not what @thodorisbais had in mind. It was more about an actual test data generation, any idea if you could come up with that, too? |
@thodorisbais @keilw From this reference, I could infer that the local setup currently demands mongodb to be be installed and setup with basic test data. Why don't we dockerise mongo with volume (so that the user doesn't loose any data). docker-compose configs lets you run migrations after setting up a DB. Could you please let me know if this would solve your issue? |
@ThirumlaDevi sounds like a good idea. I'd be happy to review a PR introducing this change. Is this something you could help us with? |
@thodorisbais Sure. I'll be happy to and i'll get back to you in case of any queries. Also, could you please assign this issue to me? |
You're all set @ThirumlaDevi ! |
Hi @thodorisbais. I have made the needed docker changes and I am able to migrate all data with a single command. But I am however facing issues with building and bringing up the spring boot project. This is my first time working with this framework. Could you please help me with building the spring-mongo project? This was the only reference I could find in your project. TIA. |
@Tegridy @thodorisbais I'm a little confused, why would it need Docker? So far the demos are all independent from Docker and I hope they also stay that way. Mongock sounds reasonable because it is a bit like Liquibase for MongoDB, but squeezing Docker in for no good reason I would not do that. |
@ThirumlaDevi No, it's the opposite, I said here earlier "Maybe with something like Liquibase" and Mongock sounds platform-neutral while Docker is tied to Linux, please let's not blow up the example with it that way @ThirumlaDevi I only mentioned we should not use mocking, but I hope you even looked at Mongock which is
And that's exactly what we could need here, not Docker. Check out the Quarkus guides where some have an optional use of Docker. There must not be a mandatory use of Docker here, |
@keilw Thank you for explaining your concern with my solution and providing some references for understanding purpose. As you pointed out @Tegridy's PR doesn't have any Docker intervention. But, there seems to be few information missing from local dummy date setup missing in PR #4. As I am not familiar with spring boot to further help you with this issue, I'll un-assign myself from this issue. Thanks for both of your time. |
@ThirumlaDevi Thanks for your understanding. If you are not familiar with Spring Boot or Spring Data it may be better. Thanks for trying to help. |
At the moment, we need to manually run the following query (Spring Boot MongoDB example) once the server is up :
Same applies to the Sprint Neo4J example; we manually play the :movies step so it can fill in the database with some sample data once the server is started.
It would be nice to automate these steps so that the database has some initial data on startup.
The text was updated successfully, but these errors were encountered: