how to update structural & data changes between PostgreSQL databases?

From: <postgresql(at)teska(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: how to update structural & data changes between PostgreSQL databases?
Date: 2006-03-22 19:36:37
Message-ID: 000001c64de7$f1dd3cb0$6601a8c0@KALI
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm looking for advice on how to update both structural changes and data
changes between PostgreSQL databases.

Here is my situation:

I have both a development and production environment. In the development
environment I have a PostgreSQL database that has many tables. Some of the
tables contain records that must be removed when the database is in
production (for example records that were entered while testing the
database) and other tables have information that must be maintained when the
database is moved to production (for example records that contain the
contents of drop down menus in my web application).

Here are my questions:

1. How should I do the initial move of the database from development to
production where the structure of the database is moved and only the data in
specific tables is moved?

2. After further development is done in the development environment, how do
I make those changes in the production database? I will need to update the
following:
a. structural changes(ex. Adding or removing fields from tables,
adding new tables, removing old tables)
b. administrative changes (ex. setting permissions on databases
and/or tables)
c. data changes (ex. Adding new records to tables that have
"maintained data")
d. ensuring that test data does not end up in the production
database (ex. Adding fake users to the system, or updating counters with
inaccurate data)
e. ensuring that existing data is not removed from the production
database (ex. A user's account information is not deleted)

I would really appreciate any and all thoughts and ideas on how to go about
these procedures.

Thank you in advance,
Courtenay

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luuk Jansen 2006-03-22 19:40:01 Updating database structure
Previous Message Steve Crawford 2006-03-22 19:35:31 Re: Advantages of PostgreSQL over MySQL 5.0