public inbox for [email protected]
help / color / mirror / Atom feedFrom: Steve Chavez <[email protected]>
To: [email protected]
Subject: Re: CLI for Schema Diff
Date: Mon, 29 Mar 2021 18:41:20 -0500
Message-ID: <CAGRrpzYy=6=Hms6hhJ2co6cJbzt9_1zaOAi5xgZJCfFBDL9jOg@mail.gmail.com> (raw)
In-Reply-To: <CAGRrpzZp0XcKQjMyXpmxBnofapOqVhU4-6FzPGfXSw=-64HAvQ@mail.gmail.com>
References: <CAGRrpzZp0XcKQjMyXpmxBnofapOqVhU4-6FzPGfXSw=-64HAvQ@mail.gmail.com>
Hey all,
In case anyone is interested, I've managed to enable a CLI mode for the
Schema Diff on this repo:
https://github.com/steve-chavez/pgadmin4/blob/cli/web/cli.py
It basically works by using a Flask test client that interacts with the
Schema Diff endpoints.
It's a single isolated file, I haven't patched any of the existing modules.
For a quickstart, there's also a docker image that can be used like:
docker run supabase/pgadmin-schema-diff \
'postgres://postgres@host/diff_source' \
'postgres://postgres@host/diff_target' \
> diff.sql
## the stderr output shows the same messages as the Schema Diff GUI:
Starting schema diff...
Comparision started......0%
Comparing FTS Dictionaries ...35%
Comparing Functions ...50%
Comparing Trigger Functions ...60%
Comparing Sequences ...70%
Comparing Tables ...80%
Comparing Views ...90%
Done.
On Wed, 10 Mar 2021 at 13:42, Steve Chavez <[email protected]> wrote:
> Hey all,
>
> The Schema Diff tool is amazing, works much better than all the current
> OSS alternatives.
>
> However, it's only possible to use it from the GUI and thus it cannot be
> used programmatically, which would be really useful for CI/CD
> environments(deployment automation).
>
> Would you guys be open to make the Schema Diff work through a CLI?
>
> Best regards,
> Steve
>
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: CLI for Schema Diff
In-Reply-To: <CAGRrpzYy=6=Hms6hhJ2co6cJbzt9_1zaOAi5xgZJCfFBDL9jOg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox