Re: what database schema version management system to use? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: what database schema version management system to use?
Date
Msg-id ne35nr$cld$1@ger.gmane.org
Whole thread Raw
In response to what database schema version management system to use?  (Alexey Bashtanov <bashtanov@imap.cc>)
List pgsql-general
Alexey Bashtanov schrieb am 06.04.2016 um 12:55:
> I am searching for a proper database schema version management system.
>
> My criteria are the following:
> 0) Open-source, supports postgresql
> 1) Uses psql to execute changesets (to have no problems with COPY, transaction management or sophisticated DDL
commands,and to benefit from scripting) 
> 2) Support repeatable migrations (SQL files that get applied every time they are changed, it is useful for functions
orviews tracking). 
>
> Reasonable?
>
> But unfortunately it looks like each of Liquibase, Flyway, SqlHawk, MigrateDB, Schema-evolution-manager,
> Depesz's Versioning, Alembic and Sqitch does not satisfy some of those, right?
>
> What DB VCS do you use and how does it related with the criteria listed above?
> Do you have any idea what other systems to try?

We are quite happy with Liquibase (using the XML format exclusively).

COPY FROM stdin isn't supported that is true, but so far we did not have the need for hat.
We don't do bulk imports in our schema migrations.

DDL commands can easily be run using the <sql> tag, but for e.g. stored functions or view definitions we usually use
<sqlFile>runOnChange="true" (that's your #2) and we only use a single statement per file so that we can also use
splitStatements=falseto avoid any problems with embedded semicolons (which in turn means that the included SQL file can
easilybe tested with psql or any other SQL client) 

We written our own implementation of the Liquibase "Database" class (actually only a slightly modified version of the
built-inone) that gets the quoting right for Liquibase & Postgres. Liquibase automatically quotes identifiers if they
areno completely written in lowercase which is a bit annoying.  

Thomas

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Trying to understand page structures in PG
Next
From: rob stone
Date:
Subject: Re: Trying to understand page structures in PG