Re: Is there a way to dump schema to files on disk and keep them in sync

From: Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com>
To: Tim Uckun <timuckun(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is there a way to dump schema to files on disk and keep them in sync
Date: 2020-12-13 22:35:26
Message-ID: CAD+mzow3xCyQP=wC879wzrftrVTf0Zc_jkuLNkNnxw0Y1cCGHg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I mean, you want to dump a schema into a directory. Alembic, sqlalchemy and
pathlib will do that in a few minutes. If you want to sync changes then
write alembic change scripts and reflect those changes in the ORM, alembic
does that. Modifying the ORM and reflecting those changes is a terrible
idea and no one does it well. Every application has huge caveats baked into
their application so I recommend not doing that. Buy seriously, this is a
few hours of work or less.

Thanks,
Ben

On Sun, Dec 13, 2020, 4:05 PM Tim Uckun <timuckun(at)gmail(dot)com> wrote:

> >pgAdmin does not create directories, it just organizes the contents of
> the system catalogs into GUI elements.
>
>
> I realize that :). I meant organized in the same way but on disk.
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Huan Ruan 2020-12-13 23:06:28 Re: Potential BRIN Index Corruption
Previous Message Adrian Klaver 2020-12-13 22:13:06 Re: Is there a way to dump schema to files on disk and keep them in sync