ALTER TABLE ProdMcias ADD ExcluidoImp BIT DEFAULT(0) NOT NULL
GO
ALTER TABLE SubGrupos ADD CdTarifImv VARCHAR(4),CdTarifIco VARCHAR(4)
GO
ALTER TABLE Trn_Kardex ADD VrImvCosto DECIMAL(16,4) DEFAULT(0) NOT NULL,TarifaIco DECIMAL(14,4) DEFAULT(0) NOT NULL
,VrImpCon DECIMAL(16,4) DEFAULT(0) NOT NULL
GO
ALTER TABLE tm_Kdex ADD tmVrImvCosto DECIMAL(16,4) DEFAULT(0),tmTarifaIco DECIMAL(14,4) DEFAULT(0),tmVrImpCon DECIMAL(16,4) DEFAULT(0)
GO
ALTER TABLE Trn_DevEnt ADD VrIvaMvc MONEY DEFAULT(0) NOT NULL
GO 
ALTER TABLE Trn_Entradas ADD VrIvaMvc MONEY DEFAULT(0) NOT NULL
GO
ALTER TABLE Trn_OCompra ADD VrIvaMvc MONEY DEFAULT(0) NOT NULL
GO
ALTER TABLE Trn_Facturas ADD VrImpCons MONEY DEFAULT(0) NOT NULL
GO
ALTER TABLE Trn_Factcon ADD VrImpCons MONEY DEFAULT(0) NOT NULL
GO
ALTER TABLE Trn_DevFcr ADD VrImpCons MONEY DEFAULT(0) NOT NULL
GO
ALTER TABLE Trn_DevFco ADD VrImpCons MONEY DEFAULT(0) NOT NULL
GO
ALTER TABLE Trn_Comprobantes ADD Establec VARCHAR(20),PEmision VARCHAR(20),Autorizac VARCHAR(50),FechaAut SMALLDATETIME
GO
--Antes de ejecutar las siguientes instrucciones (ALTER COLUMN), se deben conocer los nombres de
-- los CONSTRAINT (DEFAULT), para poder ejecurar DROP y luego ADD CONSTRAINT
ALTER TABLE tm_Comp DROP CONSTRAINT DF__tm_Comp__tmVehPr__3B8BB150
ALTER TABLE tm_Comp ALTER COLUMN tmVehPropio INT NOT NULL  
ALTER TABLE tm_Comp ADD CONSTRAINT [DF__tm_Comp__tmVehPr__3B8BB150]  DEFAULT (0) FOR tmVehPropio 
GO
ALTER TABLE tm_Compau DROP CONSTRAINT DF__tm_Compau__tmVeh__554B8353
ALTER TABLE tm_Compau ALTER COLUMN tmVehPropio INT NOT NULL  
ALTER TABLE tm_Compau ADD CONSTRAINT [DF__tm_Compau__tmVeh__554B8353]  DEFAULT (0) FOR tmVehPropio 
GO
ALTER TABLE Trn_ComDetalle DROP CONSTRAINT DF__Trn_ComDe__VehPr__1E45672C
ALTER TABLE Trn_ComDetalle ALTER COLUMN VehPropio INT NOT NULL  
ALTER TABLE Trn_ComDetalle ADD CONSTRAINT [DF__Trn_ComDe__VehPr__1E45672C]  DEFAULT (0) FOR [VehPropio]
GO
ALTER TABLE Trn_Comprobantes DROP CONSTRAINT DF__Trn_Compr__VehPr__4B180DA3
ALTER TABLE Trn_Comprobantes ALTER COLUMN VehPropio INT NOT NULL  
ALTER TABLE Trn_Comprobantes ADD CONSTRAINT [DF__Trn_Compr__VehPr__4B180DA3]  DEFAULT (0) FOR [VehPropio]
GO
ALTER TABLE tm_MovCue DROP CONSTRAINT DF__tm_MovCue__VehPr__2ACF3255
ALTER TABLE tm_MovCue ALTER COLUMN VehPropio INT NOT NULL  
ALTER TABLE tm_MovCue ADD CONSTRAINT [DF__tm_MovCue__VehPr__2ACF3255]  DEFAULT (0) FOR [VehPropio]
GO



