Schema_113: Fix push certificate column type

I519240547 extended patch sets table with push certificate column to
store push certificate that was used in ReceiveCommits. But the column
type was too small for PGP certificate description. Extend the column
from VARCHAR(255) to CLOB, as used in the account table ssh key column.

Given that the problem was discovered after 2.12 was already released,
and following the rule that we do not support DB schema migration on
stable release branches, this diff doesn't perform a schema migration.
Instead we will add this warning in the 2.12.1 release notes:

WARNING: If you already upgraded to 2.12, you would need to issue
this SQL statement manually (e.g. using `ssh host gerrit gsql` SSH
command):

  alter table patch_sets modify push_certficate clob

Note that the misspelled "push_certficate" is the actual name of the
column. The column cannot be renamed due to the fact that we cannot
run a migration.

Change-Id: I495ed0e1330811f12f082cce6b595c0cd67edabf
This commit is contained in:
David Ostrovsky
2016-01-16 15:21:15 +01:00
committed by David Pursehouse
parent 0300e1344e
commit 0265937f44

View File

@@ -188,7 +188,7 @@ public final class PatchSet {
protected String groups;
/** Certificate sent with a push that created this patch set. */
@Column(id = 7, notNull = false)
@Column(id = 7, notNull = false, length = Integer.MAX_VALUE)
protected String pushCertficate;
protected PatchSet() {