How to store version number of database layout

Started by Frank Lanitzabout 13 years ago7 messagesgeneral
Jump to latest
#1Frank Lanitz
frank@frank.uvena.de

Hi folks,

It's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

Cheers,
Frank

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In reply to: Frank Lanitz (#1)
Re: How to store version number of database layout

On 12/02/2013 10:01, Frank Lanitz wrote:

Hi folks,

It's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

Here's an easy-to-use system from one of the community:

http://www.depesz.com/2010/08/22/versioning/

HTH,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Thomas Kellerer
spam_eater@gmx.net
In reply to: Frank Lanitz (#1)
Re: How to store version number of database layout

Frank Lanitz, 12.02.2013 11:01:

It's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

We are very satisfied using Liquibase: http://www.liquibase.org/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4John R Pierce
pierce@hogranch.com
In reply to: Frank Lanitz (#1)
Re: How to store version number of database layout

On 2/12/2013 2:01 AM, Frank Lanitz wrote:

t's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

my projects, we have a small table "settings", with key text, value
text. one row is 'SCHEMA_VERSION','1.0.5'

--
john r pierce 37N 122W
somewhere on the middle of the left coast

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Chris Travers
chris.travers@gmail.com
In reply to: John R Pierce (#4)
Re: How to store version number of database layout

On Tue, Feb 12, 2013 at 2:40 AM, John R Pierce <pierce@hogranch.com> wrote:

On 2/12/2013 2:01 AM, Frank Lanitz wrote:

t's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

my projects, we have a small table "settings", with key text, value
text. one row is 'SCHEMA_VERSION','1.0.5'

this is the approach I go with too. What we also do is have all the
modules (.sql files) designed to be reloadable in a specific order and
guaranteeing a stored procedure layout consistent with the schema version.
We also have extensive db-level test cases which can be run on production
servers (all transactions roll back) so that we can check for
inconsistencies.

This is not infallible but we have had relatively few problems with it.

Best Wishes,
Chris Travers

#6Karsten Hilbert
Karsten.Hilbert@gmx.net
In reply to: Frank Lanitz (#1)
Re: How to store version number of database layout

It's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

We (www.gnumed.de) generate the md5 of a concatenation of the database
layout (tables/columns/PKs) which the client checks against and disconnects
if there's a mismatch.

Karsten

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Scott Marlowe
scott.marlowe@gmail.com
In reply to: Raymond O'Donnell (#2)
Re: How to store version number of database layout

n Tue, Feb 12, 2013 at 3:13 AM, Raymond O'Donnell <rod@iol.ie> wrote:

On 12/02/2013 10:01, Frank Lanitz wrote:

Hi folks,

It's more like a question of best practice:
How do you managing different version of database layout for e.g.
software releases?
We are planing to do an application based on postgres and want to store
some version number of database layout to ensure correct upgrade-scripts
can be applied in case of an upgrade. Is there any build in for?

Here's an easy-to-use system from one of the community:

http://www.depesz.com/2010/08/22/versioning/

I've used this system. It's versatile and easy to use. depesz++

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general