IF exists (select 1/0 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 't_f032_trmo' and TABLE_SCHEMA = 'ies' and COLUMN_NAME = 'vid_mo')
begin
ALTER TABLE [IES].[T_F032_TRMO] 
ALTER COLUMN [VID_MO] varchar(500) NULL
END

IF exists (select 1/0 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 't_f032_trmo' and TABLE_SCHEMA = 'ies' and COLUMN_NAME = 'vedpri')
begin
ALTER TABLE [IES].[T_F032_TRMO] 
ALTER COLUMN [VEDPRI] varchar(5) NULL
END

IF not exists (select 1/0 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 't_f032_trmo' and TABLE_SCHEMA = 'ies' and COLUMN_NAME = 'oid_spmo')
begin
	alter table ies.T_F032_TRMO
	add OID_SPMO varchar(255);
end
IF not exists (select 1/0 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 't_f032_trmo' and TABLE_SCHEMA = 'ies' and COLUMN_NAME = 'vid_mo')
begin
	ALTER TABLE [IES].[T_F032_TRMO] 
	ADD VID_MO varchar(500);
end
IF not exists (select 1/0 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 't_f032_trmo' and TABLE_SCHEMA = 'ies' and COLUMN_NAME = 'vedpri')
begin
	ALTER TABLE [IES].[T_F032_TRMO] 
	ADD VEDPRI varchar(5);
end