marek
committed
on 13 Oct 14
LDEV-3319: automatically perform 'patches' table upgrade if invalid primary key found.

There is a difference in 'patches' table structure … Show more
LDEV-3319: automatically perform 'patches' table upgrade if invalid primary key found.

There is a difference in  'patches' table structure in legacy autopatch and autopatch-1.4.2 version. In new version, primary key is compound and built from 'system_name' and 'patch_level' columns. There was however no validation and upgrade process present to alter primary key. Introduce such mechanism with this commit. If 'patches' table is present, but connection metadata reports single column primary key - 'alter table' query is executed (for MySQL: ALTER TABLE patches DROP PRIMARY KEY, ADD PRIMARY KEY(system_name, patch_level);)

JUnit tests of autopatch component were  updated.

Show less