dCache/dcache — pull request #517 by alrossi (2014-05-02 16:24:55+00:00)
Title: alarms, billing: fix liquibase character varying and cleanup

The latest liquibase (all 3.x versions) has a problem - it generated
invalid SQL:

https://liquibase.jira.com/browse/CORE-1853

The solution is to update all changesets to use 'VARCHAR(xxx)' instead of
'CHARACTER VARYING(xxx)'.

The affected changesets all seem to be in alarms and billing.

This patch, in addition to applying these necessary changes, has
also cleaned up the logic on index creation:

1. errors should be fail-fast, so onError=WARN have been eliminated
from these table creation routines.
2. each index is given a separate changeset with a separate pre-condition.
3. the pre-existence of the table with which the indices are associated
is assumed from the failure logic and sequence of changesets itself.

We have also eliminated a changeset from alarms which creates an unused
table.

The older affected changesets have been eliminated and their newer
versions all given new names/ids. While this will leave changeset
entries in the database changeset log table, the changes should
be idempotent inasmuch as the preconditions will prevent them from
running if the tables and indices already exist.

Inasmuch as the changes here actually do constitute fixes to
the liquibase logic, I believe this justifies backporting
the entire patch at least to 2.9.

Testing done: deployed over fresh installation and pre-existing installation of the databases.

Target: 2.9
Require-book: no
Require-notes: yes
Acked-by: Dmitry
Committed: 460b9e0ed64f2c8d83a738471b28700e71a698f7

RELEASE NOTES: fixes a regression in liquibase scripts for alarms and billing
due to a bug in updated version (3.x) producing incorrect SQL for 'character varying'.