ALTER TABLE R5TASKS add column TSK_PERFORMEDBYWOSTATUS nvarchar(8);
ALTER TABLE R5TASKS add column TSK_REVIEWEDBYWOSTATUS nvarchar(8);
ALTER TABLE R5TASKS add column TSK_CHECKLISTREJECTEDWOSTATUS nvarchar(8);
ALTER TABLE R5TASKS add column TSK_PREVENTPERFORMEDBYSIGN nvarchar(1) DEFAULT '-';
ALTER TABLE R5TASKS add column TSK_PREVENTREVIEWEDBYSIGN nvarchar(1) DEFAULT '-';

ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR31 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR32 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR33 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR34 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR35 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR36 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR37 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR38 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR39 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR40 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR41 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR42 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR43 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR44 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHAR45 NVARCHAR (80);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFNUM06 NUMERIC (24, 6);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFNUM07 NUMERIC (24, 6);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFNUM08 NUMERIC (24, 6);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFNUM09 NUMERIC (24, 6);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFNUM10 NUMERIC (24, 6);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFDATE06 DATETIME;
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFDATE07 DATETIME;
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFDATE08 DATETIME;
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFDATE09 DATETIME;
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFDATE10 DATETIME;
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHKBOX06 NVARCHAR (1);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHKBOX07 NVARCHAR (1);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHKBOX08 NVARCHAR (1);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHKBOX09 NVARCHAR (1);
ALTER TABLE R5PERMITTOWORK ADD COLUMN PTW_UDFCHKBOX10 NVARCHAR (1);

ALTER TABLE R5EVENTS ADD COLUMN EVT_CREATED DATETIME;

UPDATE R5APPSETTINGS SET AST_VALUE = '11511' WHERE AST_NAME='DBVERSION';

