--
-- DT463
-- 

ALTER TABLE DT463 ALTER COLUMN DI001097 VARCHAR(18) NOT NULL;
ALTER TABLE DT463 ALTER COLUMN DI001098 VARCHAR(18) NOT NULL;
ALTER TABLE DT463 ALTER COLUMN DI001102 VARCHAR(20);
ALTER TABLE DT463 ALTER COLUMN DI001103 VARCHAR(20);
ALTER TABLE DT463 ALTER COLUMN DI001104 VARCHAR(4);
ALTER TABLE DT463 ALTER COLUMN DI000594 VARCHAR(8);
ALTER TABLE DT463 ALTER COLUMN DI001153 VARCHAR(20);
ALTER TABLE DT463 ALTER COLUMN DI009376 VARCHAR(8);
ALTER TABLE DT463 ALTER COLUMN DI001156 VARCHAR(20);
ALTER TABLE DT463 ALTER COLUMN DI001157 VARCHAR(30);
ALTER TABLE DT463 ALTER COLUMN DI001161 VARCHAR(18);
ALTER TABLE DT463 ALTER COLUMN DI000293 VARCHAR(20);
ALTER TABLE DT463 ALTER COLUMN DI000269 VARCHAR(20);
ALTER TABLE DT463 ALTER COLUMN DI000983 VARCHAR(30);
ALTER TABLE DT463 ALTER COLUMN DI001017 VARCHAR(8);
ALTER TABLE DT463 ALTER COLUMN DI002925 VARCHAR(40);
ALTER TABLE DT463 ALTER COLUMN DI008850 VARCHAR(18);
ALTER TABLE DT463 ALTER COLUMN DI008851 VARCHAR(18);
ALTER TABLE DT463 ALTER COLUMN DI009450 VARCHAR(8);
ALTER TABLE DT463 ALTER COLUMN DI034666 VARCHAR(18);
ALTER TABLE DT463 ALTER COLUMN DI034667 VARCHAR(18);


--
-- DT466
-- 

ALTER TABLE DT466 ALTER COLUMN DI001390 VARCHAR(18) NOT NULL;
ALTER TABLE DT466 ALTER COLUMN DI001391 VARCHAR(18) NOT NULL;
ALTER TABLE DT466 ALTER COLUMN DI001392 VARCHAR(20) NOT NULL;
ALTER TABLE DT466 ALTER COLUMN DI001393 VARCHAR(8);
ALTER TABLE DT466 ALTER COLUMN DI001404 VARCHAR(20);
ALTER TABLE DT466 ALTER COLUMN DI001405 VARCHAR(20);
ALTER TABLE DT466 ALTER COLUMN DI001406 VARCHAR(4);
ALTER TABLE DT466 ALTER COLUMN DI000596 VARCHAR(8);
ALTER TABLE DT466 ALTER COLUMN DI001466 VARCHAR(2);
ALTER TABLE DT466 ALTER COLUMN DI001452 VARCHAR(8);
ALTER TABLE DT466 ALTER COLUMN DI009063 VARCHAR(8);


--
-- DT467
-- 

ALTER TABLE DT467 ALTER COLUMN DI001218 VARCHAR(20) NOT NULL;
ALTER TABLE DT467 ALTER COLUMN DI000440 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI000830 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI001223 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI001224 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI001225 VARCHAR(4);
ALTER TABLE DT467 ALTER COLUMN DI000597 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI001229 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI001232 VARCHAR(4);
ALTER TABLE DT467 ALTER COLUMN DI001235 VARCHAR(6);
ALTER TABLE DT467 ALTER COLUMN DI001246 VARCHAR(10);
ALTER TABLE DT467 ALTER COLUMN DI001247 VARCHAR(6);
ALTER TABLE DT467 ALTER COLUMN DI001252 VARCHAR(10);
ALTER TABLE DT467 ALTER COLUMN DI001253 VARCHAR(6);
ALTER TABLE DT467 ALTER COLUMN DI001258 VARCHAR(10);
ALTER TABLE DT467 ALTER COLUMN DI001259 VARCHAR(6);
ALTER TABLE DT467 ALTER COLUMN DI001264 VARCHAR(10);
ALTER TABLE DT467 ALTER COLUMN DI001265 VARCHAR(6);
ALTER TABLE DT467 ALTER COLUMN DI001270 VARCHAR(10);
ALTER TABLE DT467 ALTER COLUMN DI001271 VARCHAR(6);
ALTER TABLE DT467 ALTER COLUMN DI001675 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI007355 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI007356 VARCHAR(10);
ALTER TABLE DT467 ALTER COLUMN DI001281 VARCHAR(2);
ALTER TABLE DT467 ALTER COLUMN DI001282 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI001283 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI000803 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI000270 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI001051 VARCHAR(30);
ALTER TABLE DT467 ALTER COLUMN DI001054 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI003414 VARCHAR(2);
ALTER TABLE DT467 ALTER COLUMN DI006128 VARCHAR(2);
ALTER TABLE DT467 ALTER COLUMN DI009479 VARCHAR(8);
ALTER TABLE DT467 ALTER COLUMN DI009753 VARCHAR(20);
ALTER TABLE DT467 ALTER COLUMN DI022077 VARCHAR(20);

--
-- DT468_TEMP
-- 

ALTER TABLE DT468_TEMP ALTER COLUMN COMMENTS VARCHAR(30);


--
-- DT472
-- 

ALTER TABLE DT472 ALTER COLUMN DI001395 VARCHAR(18) NOT NULL;
ALTER TABLE DT472 ALTER COLUMN DI001516 VARCHAR(18);
ALTER TABLE DT472 ALTER COLUMN DI001517 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI001518 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI001503 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI001504 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI001505 VARCHAR(4);
ALTER TABLE DT472 ALTER COLUMN DI000602 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI001445 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI001492 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI003402 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI005319 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI005320 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI006190 VARCHAR(10);
ALTER TABLE DT472 ALTER COLUMN DI007435 VARCHAR(38);
ALTER TABLE DT472 ALTER COLUMN DI007436 VARCHAR(6);
ALTER TABLE DT472 ALTER COLUMN DI007783 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI022085 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI026859 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI027646 VARCHAR(16);
ALTER TABLE DT472 ALTER COLUMN DI027663 VARCHAR(20);
ALTER TABLE DT472 ALTER COLUMN DI029529 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI029530 VARCHAR(8);
ALTER TABLE DT472 ALTER COLUMN DI029531 VARCHAR(8);


--
-- DT818
-- 

ALTER TABLE DT818 ALTER COLUMN DI007935 VARCHAR(8) NOT NULL;
ALTER TABLE DT818 ALTER COLUMN DI007936 VARCHAR(20) NOT NULL;
ALTER TABLE DT818 ALTER COLUMN DI007944 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007945 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007946 VARCHAR(4);
ALTER TABLE DT818 ALTER COLUMN DI007947 VARCHAR(8);
ALTER TABLE DT818 ALTER COLUMN DI007951 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI007952 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI007987 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007988 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007989 VARCHAR(30);
ALTER TABLE DT818 ALTER COLUMN DI007990 VARCHAR(30);
ALTER TABLE DT818 ALTER COLUMN DI007991 VARCHAR(8);
ALTER TABLE DT818 ALTER COLUMN DI007992 VARCHAR(8);
ALTER TABLE DT818 ALTER COLUMN DI007993 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007994 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007995 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007996 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007997 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007998 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI007999 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI008000 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI008001 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008002 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008003 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008032 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008015 VARCHAR(30);
ALTER TABLE DT818 ALTER COLUMN DI008016 VARCHAR(30);
ALTER TABLE DT818 ALTER COLUMN DI008019 VARCHAR(30);
ALTER TABLE DT818 ALTER COLUMN DI008020 VARCHAR(30);
ALTER TABLE DT818 ALTER COLUMN DI008021 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008022 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008023 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008024 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008025 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008026 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008027 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008028 VARCHAR(2);
ALTER TABLE DT818 ALTER COLUMN DI008029 VARCHAR(26);
ALTER TABLE DT818 ALTER COLUMN DI008031 VARCHAR(26);
ALTER TABLE DT818 ALTER COLUMN DI008030 VARCHAR(26);
ALTER TABLE DT818 ALTER COLUMN DI008763 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI008764 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI008817 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI008828 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI034389 VARCHAR(8);
ALTER TABLE DT818 ALTER COLUMN DI034390 VARCHAR(8);
ALTER TABLE DT818 ALTER COLUMN DI034392 VARCHAR(18);
ALTER TABLE DT818 ALTER COLUMN DI029927 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029928 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029937 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029938 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029939 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029940 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029941 VARCHAR(20);
ALTER TABLE DT818 ALTER COLUMN DI029942 VARCHAR(20);


--
-- DT827_CONDENSED
-- 

ALTER TABLE DT827_CONDENSED ALTER COLUMN DENSITYRATIO NUMERIC(5,0);
ALTER TABLE DT827_CONDENSED ALTER COLUMN PROJECTLEVEL NUMERIC(5,0);


--
-- DT866
-- 

ALTER TABLE DT866 ALTER COLUMN DI028027 VARCHAR(8) NOT NULL;
ALTER TABLE DT866 ALTER COLUMN DI028031 VARCHAR(20);
ALTER TABLE DT866 ALTER COLUMN DI028032 VARCHAR(20);
ALTER TABLE DT866 ALTER COLUMN DI028033 VARCHAR(4);
ALTER TABLE DT866 ALTER COLUMN DI028034 VARCHAR(8);


--
-- DT874
-- 

ALTER TABLE DT874 ALTER COLUMN DI053227 VARCHAR(8) NOT NULL;
ALTER TABLE DT874 ALTER COLUMN DI053231 VARCHAR(20);
ALTER TABLE DT874 ALTER COLUMN DI053232 VARCHAR(20);
ALTER TABLE DT874 ALTER COLUMN DI053233 VARCHAR(4);
ALTER TABLE DT874 ALTER COLUMN DI053234 VARCHAR(8);


--
-- DT875
-- 

ALTER TABLE DT875 ALTER COLUMN DI053239 VARCHAR(8) NOT NULL;
ALTER TABLE DT875 ALTER COLUMN DI053243 VARCHAR(20);
ALTER TABLE DT875 ALTER COLUMN DI053244 VARCHAR(20);
ALTER TABLE DT875 ALTER COLUMN DI053245 VARCHAR(4);
ALTER TABLE DT875 ALTER COLUMN DI053246 VARCHAR(8);


-- Recreate dropped indices

CREATE UNIQUE NONCLUSTERED INDEX [PK_covering_query] ON [DT463]
(
	[DI001097] ASC,
	[DI001098] ASC
)
INCLUDE ( 	[DI008850],
	[DI008851]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];

CREATE UNIQUE CLUSTERED INDEX [PARENT_PR+PARENT_TASK+PR+TASK] ON [DT463]
(
	[DI008850] ASC,
	[DI008851] ASC,
	[DI001097] ASC,
	[DI001098] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];

CREATE NONCLUSTERED INDEX [RECURSION_PARENT] ON [DT463]
(
	[DI008850] ASC,
	[DI008851] ASC
)
INCLUDE ( 	[DI001097],
	[DI001098]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];

CREATE NONCLUSTERED INDEX [IDX_DT467_EVA_RES_Type] ON [DT467]
(
	[DI001218] ASC,
	[DI003414] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];

CREATE NONCLUSTERED INDEX [SID466DT472] ON [DT472]
(
	[DI001395] ASC,
	[DI001516] ASC,
	[DI001517] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY];
