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

2020-12-13 Thread Benedict Holland
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

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

2020-12-13 Thread Adrian Klaver
On 12/13/20 1:04 PM, Tim Uckun 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. Nothing that I know of. You could do a pg_dump -d some_db -s/--schema-only a

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

2020-12-13 Thread Tim Uckun
>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.

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

2020-12-13 Thread Tim Uckun
My primary use case for this is for development and experimentation, I have no intent on using it on production servers :) I normally use migrations for those. On Sun, Dec 13, 2020 at 9:04 PM Ron wrote: > > On 12/12/20 8:58 PM, Tim Uckun wrote: > > I want to dump my postgres schema to disk in ne

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

2020-12-13 Thread Adrian Klaver
On 12/13/20 10:03 AM, Benedict Holland wrote: You want Alembic and an afternoon of python writing. You just described an ORM. In other words out of the frying pan and into the fire. On Sun, Dec 13, 2020, 12:53 PM Tomas Vondra mailto:tomas.von...@enterprisedb.com>> wrote: On 12/13/20

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

2020-12-13 Thread Benedict Holland
You want Alembic and an afternoon of python writing. You just described an ORM. On Sun, Dec 13, 2020, 12:53 PM Tomas Vondra wrote: > On 12/13/20 6:34 PM, Adrian Klaver wrote: > > On 12/12/20 6:58 PM, Tim Uckun wrote: > >> I want to dump my postgres schema to disk in neat directories like > >> pg

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

2020-12-13 Thread Tomas Vondra
On 12/13/20 6:34 PM, Adrian Klaver wrote: > On 12/12/20 6:58 PM, Tim Uckun wrote: >> I want to dump my postgres schema to disk in neat directories like >> pgadmin presents. Then I want to be able to edit the files and sync >> changes to the database and ideally if changes were made in the >> databa

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

2020-12-13 Thread Adrian Klaver
On 12/12/20 6:58 PM, Tim Uckun wrote: I want to dump my postgres schema to disk in neat directories like pgadmin presents. Then I want to be able to edit the files and sync changes to the database and ideally if changes were made in the database to sync them back to the disk. Is there a tool tha

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

2020-12-13 Thread Ron
On 12/12/20 8:58 PM, Tim Uckun wrote: I want to dump my postgres schema to disk in neat directories like pgadmin presents. Then I want to be able to edit the files and sync changes to the database and ideally if changes were made in the database to sync them back to the disk. That could get rea

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

2020-12-12 Thread Tim Uckun
I want to dump my postgres schema to disk in neat directories like pgadmin presents. Then I want to be able to edit the files and sync changes to the database and ideally if changes were made in the database to sync them back to the disk. Is there a tool that does this? Is there a tool that will d