5 ms·
Is it on github?
by nextaccountic 3y ago
Is it on github?
- codesnik 3y agono. it was a private project, and my solution wasn't general enough. for functions/views/etc: I've used https://github.com/omniti-labs/pg_extractor https://github.com/omniti-labs/pg_extractor then removed roles from dump (because the fluctuated between developers) and executed perl -000 -i -lne 'print if ! /^--/ && ! /^SET /' `find schema/ -name '*.sql'` || exit 1 to remove a lot of useless comments and flags from the dump (pg_dump output isn't too readable). This oneliner can strip too much, though, comments in functions shouldn't start from the 0 column. The same script had been run on CI too, to verify that developer didn't forget to run it in the PR.