Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRtGY-0007bv-Mb for pgadmin-hackers@arkaria.postgresql.org; Thu, 01 Apr 2021 09:05:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRtGX-0002W8-EO for pgadmin-hackers@arkaria.postgresql.org; Thu, 01 Apr 2021 09:05:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRkPh-0004w6-Dc for pgadmin-hackers@lists.postgresql.org; Wed, 31 Mar 2021 23:38:17 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lRkPa-0007Zd-EQ for pgadmin-hackers@postgresql.org; Wed, 31 Mar 2021 23:38:16 +0000 Received: by mail-oi1-x231.google.com with SMTP id a8so21677678oic.11 for ; Wed, 31 Mar 2021 16:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=supabase.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oBwOg3Oe6ERxJ/3W2g3U30dO+1wfgEKQcy/b3lj/pg4=; b=FVboXD2WQsyYIGcj9uEh8p4D8jfHP3ojGzJ2j2UztZRIc7iYm2o/S3hLZ2sDMNVQvK ytjfTfRLu8yiq/PgJjbQALA58COx5/Se0+PU9TBr2lHMs3jG2iLO8X9L1FnZoAUxtuHR ZwcNud6foyU6uoLC/tJfCm5/hEIbt5x8SRnS6R++QZt9XwdJm7w3dAb27GijINQWIOHQ hyFv4Ym3iDMxeWRxFuxbzACBcRtkAsjFaFIAoKSvcooF0TinPpn7e3nfc9XKRp8eWuTy 2XPMa0pqR/8SRabG9f9RLD+p29q7LxaZbuBfB8AJDZQM+zMuKBXcOt/0OLfKtGT/j9M7 l7Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=oBwOg3Oe6ERxJ/3W2g3U30dO+1wfgEKQcy/b3lj/pg4=; b=ZvGNHUXr9b5NJqUgmyTuqvHqWflyK4cbdGZY6l9K2cRlU3RquyvK0kyGUxzyFe9Ep9 fuwGcPR26nmMq+65feOHigJ8z1m8EVf+T06YkJeVt/ydCNigz4pf0fVHUEc4j1cj6AYr iES78p3PaQPYpcDXSCnYNnDdDPWqdQW81qSNwx1ZZzmcA4Bq7rnB4WEySNPO8Bb3XxfP Tsr7+cjIXMnH3t5Lelvw388CtGHLEyr1PoYBsu/HVhe+Ng3uuC0XkqPT49hJexRTSjHO tsRLUItRW+Er3y4LjxTmTledM2uA6RWtV64BvHYW+yz35V/6I5Q0ol6bMAtHWLZOdR7p rqdw== X-Gm-Message-State: AOAM5327ciOVad8bcRmerDjYKy/k5ulK0rt8vNTRcWMWQtIWV6g4+QKH UaruN93Gor/dQ5/46euY185m1ttfXLpD12ao702ukiditN0JYQ== X-Google-Smtp-Source: ABdhPJy5v2CWv7SRMoLC0OnDbhBBEevTZFFCbWU1WF9/wn6RgdSVsU8irXXGv7peYFtFGySb6xNZJJjBL8nnvYajnWE= X-Received: by 2002:aca:f44d:: with SMTP id s74mr3875595oih.168.1617233888284; Wed, 31 Mar 2021 16:38:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Steve Chavez Date: Wed, 31 Mar 2021 18:37:57 -0500 Message-ID: Subject: Re: CLI for Schema Diff To: Dave Page , pgadmin-hackers@postgresql.org Content-Type: multipart/alternative; boundary="0000000000006e23f005bedd9bd9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006e23f005bedd9bd9 Content-Type: text/plain; charset="UTF-8" > 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 wrote: > Hi > > On Tue, Mar 30, 2021 at 3:36 PM Steve Chavez 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@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. >> >> > 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 > > --0000000000006e23f005bedd9bd9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> but is this something you'd be interested in work= ing on to become a more fully featured and production quality CLI?=C2=A0
Yes, absolutely! What would be the next step? I'm all for doi= ng a CLI that covers pgAdmin quality standards.

On Wed, 31 Mar 2021 = at 03:08, Dave Page <dpage@pgadmin.= org> wrote:
Hi

On Tue, Mar 30, 2021 at 3:36 PM Steve Chavez <= ;steve@supabase.io> wrote:
Hey all,

It basically works by using a Flask t= est 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 imag= e that can be used like:

docker run supabase/pgadmin-schema-dif=
f \
'postgres://postgres@host/diff_so= urce' \
'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 Sequence= s ...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 fea= tured and production quality CLI?=C2=A0

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitte= r: @pgsnake

EDB: http://www.enterprisedb.com

--0000000000006e23f005bedd9bd9--