Generate different database name for dev and prod in application-xxx.yml. For eg, suffix with dev database like myapp_dev in application-dev.yml and myapp_prod in application-prod.yml.
Running the in app in prod mode in laptop is using the same dev database which I do not like to use.
If I want to use different database name for dev and prod, I change it and use. But next time I regenerate or upgrade, it is gone. Re-changing is not a big task but having different name in first place is even better.
This makes sure that same database is not used in both dev and prod, although same database platform (may) be used.
+1 this is the convention used by Ruby on Rails and it's quite useful.
-1 for me, let me explain why:
dev,db1, dev,db2, etc profile. That's the power of Spring BootThanks for your opinions.
@pascalgrimaud during development, If I want to run app with prod profile I would like not to use db which I use in dev profile but this again is just a personal preference.
For docker files and creating 2 db is a bit more work but IMO it is worth if I want to have different db.
And for running with spring-boot profiles, it comes to my original issue that after regenerate/upgrade I have to at least modify a few place or run the command by providing custom profile each time.
For some including me, this would be a good thing to have in first place :)
I think we could implement this feature similarly to the way we do the "angularsuffix". So it will be a somewhat hidden feature but exposed by the JDL.
It's opened for long time and very few comments.
Not sure people are interested by this feature and I think you can use Spring Boot profile to do what you want.
Most helpful comment
-1 for me, let me explain why:
dev,db1,dev,db2, etc profile. That's the power of Spring Boot