A safe way to upgrade table definitions by using ALTER's - Mailing list pgsql-general

From Sergey Samokhin
Subject A safe way to upgrade table definitions by using ALTER's
Date
Msg-id e42595410908271342g53c7350fva922794827e079a3@mail.gmail.com
Whole thread Raw
Responses Re: A safe way to upgrade table definitions by using ALTER's  (Steve Atkins <steve@blighty.com>)
Re: A safe way to upgrade table definitions by using ALTER's  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
Hello.

As I know upgrading database structure from one version to another is
usually done by applying some sql-script with a set of ALTER's that do
all the work.

But how do programmers guarantee that ALTER's they have wrote will
always be applied by administrators to the corresponding version of
the database?

Is there a standard way to store some kind of metainformation in DB
(like version of the current definitions of tables) and then check if
it is too old for being upgraded by a given script?

By "database structure" I mean definition of tables an application
uses (data types, constraints, modificators etc), stored procedures
etc.

Thanks.

--
Sergey Samokhin

P.S. If there is other convinient way to do upgrades which I've missed
- please let me know. I'm still a novice in the PostgreSQL/SQL world.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: query that worked in 8.1 not working in 8.4
Next
From: Sean Foreman
Date:
Subject: Re: query that worked in 8.1 not working in 8.4