Re: Updating database structure

Поиск
Список
Период
Сортировка
Искать
От
Guido Neitzer
Тема
Re: Updating database structure
Дата
Msg-id
4DEFDD44-3B7F-43A3-ABC8-2534B8F0999F@pharmaline.de
Ответ на
Re: Updating database structure (subscribe@angelosystems.com)
Список
Дерево обсуждения
Updating database structure Luuk Jansen <subscribe@angelosystems.com>
Re: Updating database structure Janning Vygen <vygen@gmx.de>
Re: Updating database structure subscribe@angelosystems.com
Re: Updating database structure Guido Neitzer <guido.neitzer@pharmaline.de>
Re: Updating database structure Alban Hertroys <alban@magproductions.nl>
Re: Updating database structure Miroslav Šulc <miroslav.sulc@startnet.cz>
Re: Updating database structure Jim Nasby <jnasby@pervasive.com>
Re: Updating database structure Johan Vromans <jvromans@squirrel.nl>
On 23.03.2006, at 9:50 Uhr, subscribe@angelosystems.com wrote:

> I currently use phpPgAdmin to make changes to the database, so it  
> would
> be very handy if Postgres could add a change made to a lable  
> somewhere,
> after which I gather all the rows with changes and put them in a SQL
> query.

I mostly use the command line tools or a graphical tool to make my  
own sql calls for every schema change I make on the development  
database.

Then all these changes come to a "script" in my application (it's not  
actually a script but similar). The database has a version tag in one  
table. The application has a bunch of these "scripts" to convert from  
one version to another.  It knows the sequence in how they have to be  
applied by looking at the version numbers.

So, let's say, the production database is on version 1.1 and you have  
made several test versions connecting to a test server, the test/dev  
db is on version 1.4 and now I want to put my new application online.  
I simply shut down all running instances of my app, replace the  
application binaries, start the application again (one single  
instance for now), the app checks the DB version, sees that changes  
have to be made and applies all scripts necessary for converting the  
db from version 1.1 to 1.4 automatically. When this is done, I start  
the other instances and everything is fine.

For the kids: Don't do this at home without a fresh backup and  
without a lot of testing of this process!

cug



-- 
PharmaLine, Essen, GERMANY
Software and Database Development


В списке pgsql-general по дате отправления
От: subscribe@angelosystems.com
Дата:
От: Just Someone
Дата:
Сообщение: Some pgbench results
FAQ