How do I create a temporary database for PostgreSQL using initdb
? Also, how do I populate it with dummy data and how do I delete it after usage?
I have an entire schema of the database. I don't want to create temporary tables one by one. Using initdb
, I would like to be able to give the schema and get a database with the tables, etcetera created.
This is for running integration tests of a spring boot application. I use mybatis to access the database.
Can I use any other tool like arquillian?