From: | Steve Chavez <steve(at)supabase(dot)io> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: CLI for Schema Diff |
Date: | 2021-03-31 23:37:57 |
Message-ID: | CAGRrpzbPk2bNmkoqb0NJCFYHLFQD9NusBmje+2gbuwvuETRHyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
> but is this something you'd be interested in working on to become a more
fully featured and production quality CLI?
Yes, absolutely! What would be the next step? I'm all for doing a CLI that
covers pgAdmin quality standards.
On Wed, 31 Mar 2021 at 03:08, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Hi
>
> On Tue, Mar 30, 2021 at 3:36 PM Steve Chavez <steve(at)supabase(dot)io> wrote:
>
>> 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(at)host/diff_source' \
>> 'postgres://postgres(at)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.
>>
>>
> That's an interesting approach! Obviously the code is just a proof of
> concept at the moment (redirecting stdout is masking errors for example),
> but is this something you'd be interested in working on to become a more
> fully featured and production quality CLI?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pradip Parkale | 2021-04-01 06:10:00 | Re: [pgAdmin][RM5519]: Unable to close tab after disconnecting server. |
Previous Message | Dave Page | 2021-03-31 14:23:36 | Re: [pgAdmin][RM5519]: Unable to close tab after disconnecting server. |