Re: PostgreSQL DB in prod, test, debug

2024-02-15 Thread Jay Stanley
On 2024-02-15 23:51, Peter J. Holzer wrote: On 2024-02-14 11:25:48 +0100, Daniel Gustafsson wrote: On 14 Feb 2024, at 10:59, Simon Connah wrote: This is probably a stupid question so I apologies in advance. There is no such thing. What I think is the best way to do this is to do a pg_dump of

Re: PostgreSQL DB in prod, test, debug

2024-02-15 Thread Peter J. Holzer
On 2024-02-14 11:25:48 +0100, Daniel Gustafsson wrote: > > On 14 Feb 2024, at 10:59, Simon Connah > > wrote: > > > This is probably a stupid question so I apologies in advance. > > There is no such thing. > > > What I think is the best way to do this is to do a pg_dump of the > > database (usi

Re: PostgreSQL DB in prod, test, debug

2024-02-14 Thread Adrian Klaver
On 2/14/24 02:38, Erik Wienhold wrote: On 2024-02-14 10:59 +0100, Simon Connah wrote: The database schema should be defined by migration scripts that you also check into version control with the rest of your application sources. Some people also prefer a separate repository just for the datab

Re: PostgreSQL DB in prod, test, debug

2024-02-14 Thread Simon Connah
On Wednesday, 14 February 2024 at 10:38, Erik Wienhold wrote: > > > On 2024-02-14 10:59 +0100, Simon Connah wrote: > > > This project uses Python 3.12, Flask, psycopg3 and PostgreSQL 15. > > > > This is probably a stupid question so I apologies in advance. > > > > I'm building a website

Re: PostgreSQL DB in prod, test, debug

2024-02-14 Thread Simon Connah
On Wednesday, 14 February 2024 at 10:25, Daniel Gustafsson wrote: > > > > On 14 Feb 2024, at 10:59, Simon Connah simon.n.con...@protonmail.com wrote: > > > This is probably a stupid question so I apologies in advance. > > > There is no such thing. > > > What I think is the best way t

Re: PostgreSQL DB in prod, test, debug

2024-02-14 Thread Erik Wienhold
On 2024-02-14 10:59 +0100, Simon Connah wrote: > This project uses Python 3.12, Flask, psycopg3 and PostgreSQL 15. > > This is probably a stupid question so I apologies in advance. > > I'm building a website using PostgreSQL and since I've just been doing > some dev work on it I've just manually

Re: PostgreSQL DB in prod, test, debug

2024-02-14 Thread Daniel Gustafsson
> On 14 Feb 2024, at 10:59, Simon Connah wrote: > This is probably a stupid question so I apologies in advance. There is no such thing. > What I think is the best way to do this is to do a pg_dump of the database > (using the --schema-only flag) and then load it into a test only database > th

PostgreSQL DB in prod, test, debug

2024-02-14 Thread Simon Connah
Hi, This project uses Python 3.12, Flask, psycopg3 and PostgreSQL 15. This is probably a stupid question so I apologies in advance. I'm building a website using PostgreSQL and since I've just been doing some dev work on it I've just manually played around with the database if I needed new tabl