IF NOT EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE ID = OBJECT_ID('EST_PED_CP_PARAM') AND name = 'FLAG_PARAM_MCP')
BEGIN
	ALTER TABLE EST_PED_CP_PARAM ADD FLAG_PARAM_MCP INT
	ALTER TABLE EST_PED_CP_PARAM ADD CONSTRAINT DF_EST_PED_CP_PARAM_FLAG_PARAM_MCP DEFAULT 0 FOR FLAG_PARAM_MCP		
END

GO

IF EXISTS (SELECT 1 FROM SYSCOLUMNS WHERE ID = OBJECT_ID('EST_PED_CP_PARAM') AND name = 'FLAG_PARAM_MCP')
BEGIN 
	UPDATE EST_PED_CP_PARAM SET FLAG_PARAM_MCP = 0 WHERE FLAG_PARAM_MCP IS NULL
END