[patch] pgsql upgrade 2.3.3 -> 2.4.0
Joe Marcus Clarke
marcus at marcuscom.com
Thu Jun 28 18:50:37 EDT 2007
On Fri, 2007-06-29 at 02:44 +0400, Boris Samorodov wrote:
> Hi!
>
>
> Upgrading via upgrade.sh from 2.3.3 to 2.4.0 for pgsql was not a
> success. Investigating shows that some changes to the file
> mig_pgsql_tinderbox-2.3.3_to_2.4.0.sql should be done:
> -----
> --- mig_pgsql_tinderbox-2.3.3_to_2.4.0.sql.orig 2007-06-29 02:35:56.000000000 +0400
> +++ mig_pgsql_tinderbox-2.3.3_to_2.4.0.sql 2007-06-29 02:36:46.000000000 +0400
> @@ -1,7 +1,7 @@
> CREATE TABLE hooks (
> Hook_Name VARCHAR(32) NOT NULL PRIMARY KEY,
> Hook_Cmd VARCHAR(255),
> - Hook_Description TEXT,
> + Hook_Description TEXT
> );
>
> INSERT INTO hooks VALUES ('prePortsTreeUpdate', NULL, 'Hook to run prior to updating a PortsTree.\nIf this hook returns a non-zero value, the PortsTree will not be updated.\nThe following environment will be passed to the hook command:\n\tPORTSTREE : PortsTree name\n\tUPDATE_CMD : Update command\n\tPB : Tinderbox root');
> @@ -21,6 +21,7 @@
> ADD COLUMN Last_Failed_Dependency VARCHAR(255),
> ADD COLUMN Last_Run_Duration INTEGER,
> ADD COLUMN Currently_Building INTEGER NOT NULL DEFAULT 0,
> - ALTER COLUMN Last_Status TYPE VARCHAR(16) CHECK (Last_Status IN ('UNKNOWN','SUCCESS','FAIL','BROKEN','LEFTOVERS','DUD','DEPEND')) DEFAULT 'UNKNOWN';
> + DROP COLUMN Last_Status,
> + ADD COLUMN Last_Status VARCHAR(16) CHECK (Last_Status IN ('UNKNOWN','SUCCESS','FAIL','BROKEN','LEFTOVERS','DUD','DEPEND')) DEFAULT 'UNKNOWN';
>
> UPDATE config SET Config_Option_Value='2.4.0' WHERE Config_Option_Name='__DSVERSION__';
> -----
>
> 1. Fix a typo (delete unneeded ",").
> 2. This one was not as easy as the first one. Seems that PostgerSQL (at
> least since 7.3) does not have a feature to alter a column
> constraint. Hence I deletted one and recreate it. Yes, the history
> had been deletted. Another way is to use a new constraint...
Both of these have already been fixed by mux (and committed to CVS).
Joe
--
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://marcuscom.com/pipermail/tinderbox-list/attachments/20070628/3acc9a1b/attachment.bin
More information about the tinderbox-list
mailing list