Re: Version Control?

Поиск
Список
Период
Сортировка
От elein@varlena.com (elein)
Тема Re: Version Control?
Дата
Msg-id 20050609224959.GO17206@varlena.com
обсуждение исходный текст
Ответ на Re: Version Control?  (John Browne <jkbrowne@gmail.com>)
Ответы Re: Version Control?  (Russ Brown <pickscrape@gmail.com>)
Список pgsql-general
On Thu, Jun 09, 2005 at 04:16:46PM -0500, John Browne wrote:
> How would you handle the migration of the data with these user
> scripts?  Dump it to a temp table?
>

If your scripts are correct, you should be able to load
your base scripts and apply each change script in order
and have the result be the exact same database schema.

If they are not, checkpoint with a schema dump and start
again with the change scripts.  Of course getting the
scripts wrong is against the point of the whole exercise,
but it is not easy and requires vigilance.

--elein
=============================================================
elein@varlena.com        Varlena, LLC        www.varlena.com
(510)655-2584(o)                             (510)543-6079(c)
          PostgreSQL Consulting, Support & Training

PostgreSQL General Bits   http://www.varlena.com/GeneralBits/
==============================================================
I have always depended on the [QA] of strangers.


>
> On 6/9/05, elein <elein@varlena.com> wrote:
> > Up until the database goes into production,
> > keep files: schema.sql (table creation),
> > views.sql, functions.sql triggers.sql trigfunctions.sql
> > in cvs/svn.
> >
> > Afterwards any changes to the schema are in
> > change01.sql, change02.sql,...
> >
> > The change scripts hold the alter table statements
> > for schema changes.  They must be cumulative.
> > Ideally you'd have corresponding undochange01.sql
> > but that is icing.
> >
> > Never let anyone change the database without creating
> > the appropriate change script.
> >
> > --elein
> >
> > On Thu, Jun 09, 2005 at 03:25:14PM -0500, Peter Fein wrote:
> > > Hi-
> > >
> > > Any general tips on using version control (CVS, SVN) while doing
> > > database design? My thought was to do a text-mode dump (including
> > > populated code tables) from PGAdmin.
> > >
> > > How do people do this?
> > >
> > > --
> > > Peter Fein                 pfein@pobox.com                 773-575-0694
> > >
> > > Basically, if you're not a utopianist, you're a schmuck. -J. Feldman
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 5: Have you checked our extensive FAQ?
> > >
> > >                http://www.postgresql.org/docs/faq
> > >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> >                http://archives.postgresql.org
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: ERROR: cannot cast type text to bit varying
Следующее
От: Matt Miller
Дата:
Сообщение: Re: ERROR: cannot cast type text to bit varying