Home > database >  How to set up initial data for different databases?
How to set up initial data for different databases?

Time:11-29

please help me I'm new to this business. I'm writing a Spring Boot Web Application for CV and I'd like to create a separate DB for test purposes. What is the best way to do it? Currently, I initialize my main MySQL DB using Hibernate feature import.sql and it's working fine for the main DB. What's the best way to create a test DB? I tried with h2 base but my import.sql overrides h2 base data. Is it possible to set up data for the second (another) DB using import.sql?

CodePudding user response:

I found an answer. It's the same as with the main DB. I had to create a new resource folder in the test package and pasted here import.sql (for test DB). That's all!

  • Related