
ALTER TABLE JobMedia DROP Copy ;
ALTER TABLE Job ADD COLUMN HasCache smallint default 0;
ALTER TABLE Job ADD COLUMN Reviewed smallint default 0;
ALTER TABLE Job ADD COLUMN Comment text;
ALTER TABLE JobHisto ADD COLUMN HasCache smallint default 0;
ALTER TABLE JobHisto ADD COLUMN Reviewed smallint default 0;
ALTER TABLE JobHisto ADD COLUMN Comment text;

ALTER TABLE Status ADD COLUMN Severity int;







-- suppress output for index modification

-- Remove bad PostgreSQL index
DROP INDEX file_fp_idx;

-- Create the good one
-- If you want to create this index during production, you can use
-- CREATE INDEX CONCURRENTLY file_jpf_idx ON File (JobId, PathId, FilenameId)
-- to make it without locks (require PostgreSQL 8.2 version)


-- restore output

