Re: Is there a way to dump schema to files on disk and keep them in sync - Mailing list pgsql-general

From Benedict Holland
Subject Re: Is there a way to dump schema to files on disk and keep them in sync
Date
Msg-id CAD+mzow3xCyQP=wC879wzrftrVTf0Zc_jkuLNkNnxw0Y1cCGHg@mail.gmail.com
Whole thread Raw
In response to Re: Is there a way to dump schema to files on disk and keep them in sync  (Tim Uckun <timuckun@gmail.com>)
List 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@gmail.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.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Is there a way to dump schema to files on disk and keep them in sync
Next
From: Huan Ruan
Date:
Subject: Re: Potential BRIN Index Corruption