
/*------ ATD 336791 ------*/
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'MANIFESTOCARGA' AND COLUMN_NAME = 'nfEntrada') 
alter TABLE dbo.MANIFESTOCARGA add nfEntrada NUMERIC(1,0)
go
/*------ ATD 338342 ------*/
IF NOT EXISTS (SELECT 1 FROM SYSOBJECTS WHERE xtype='U' AND name='CANCELAMENTOLOCALFISICO')
BEGIN
	CREATE TABLE CANCELAMENTOLOCALFISICO(
				ID INT IDENTITY NOT NULL,
				NUMORD INT NOT NULL, 
				ITEM CHAR(5) NOT NULL, 
				CODPRO CHAR(5) NOT NULL,
				LOTEINTERNO CHAR(7) NOT NULL,
				LOCALFISICO CHAR(5) NOT NULL,
				QUANTIDADE NUMERIC(13,3) NULL,
				CONSTRAINT PK_CANCELAMENTOLOCALFISICO PRIMARY KEY (ID))
END
GO