zonkyio / embedded-postgres-binaries

Lightweight bundles of PostgreSQL binaries with reduced size intended for testing purposes.
Apache License 2.0
138 stars 29 forks source link

Include psql and pg_restore executables #19

Closed ketronkowski closed 4 years ago

ketronkowski commented 4 years ago

Would it be possible to include the psql and pg_restore executables in the bundle?

We are looking to put together some schema/data migration tests from know database states and are struggling to figure out how to seed the embedded database without the tools.

Thanks!

tomix26 commented 4 years ago

In my opinion, the bundle should contain only executables needed to run the database. If the psql and pg_restore executables were included into the bundle, the resulting size would be about 1MB larger and not everyone needs it.

So I would rather you solve this problem in some other way. For example, using Flyway migration tool or, if you are using embedded-database-spring-test library, using docker provider and baking the data with database states into a docker image.

Are these solutions acceptable to you?

ketronkowski commented 4 years ago

Thanks for getting back to me and the rationale for not already including the commands.

The tests that we would like to run are actually testing our liquibase schema migrations (including custom migrators that programmatically manipulate data already existing in the DB).

If having at least the psql tool included is not an option we could certainly give the docker provider a shot.

Thanks again!