Codd is a simple-to-use CLI tool that applies plain postgres SQL migrations atomically with strong and automatic cross-environment schema equality checks.
Other
38
stars
1
forks
source link
Add new command to apply arbitrary SQL with no strings attached, similar to `psql -f` #185
The main use case that brought me to create this issue is that it would be outstanding if we could restore a large dump while skipping copying a hypothetical logs table, e.g.:
The main use case that brought me to create this issue is that it would be outstanding if we could restore a large dump while skipping copying a hypothetical
logs
table, e.g.:gunzip -c some-large-dump-file.sql.gz | codd runsql --skip-copy-to public.logs
With
psql
orpg_restore
this cannot be done, and it would speed up the scenario above by a lot.This contrasts a little with the simplicity of codd, but if well documented I wouldn't be surprised if users end up finding it useful.
We could emulate other of the flags of
psql
, e.g.-1
for transaction wrapping, but only the ones that are simple enough to do.