-- BA_MetadataDefinition
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BA_MetadataDefinition' AND COLUMN_NAME = 'HideOnDisplayForm')
BEGIN
	ALTER TABLE BA_MetadataDefinition ADD HideOnDisplayForm bit NOT NULL DEFAULT(0)
END;

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BA_MetadataDefinition' AND COLUMN_NAME = 'HideOnNewForm')
BEGIN
	ALTER TABLE BA_MetadataDefinition ADD HideOnNewForm bit NOT NULL DEFAULT(0)
END;

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BA_MetadataDefinition' AND COLUMN_NAME = 'HideOnEditForm')
BEGIN
	ALTER TABLE BA_MetadataDefinition ADD HideOnEditForm bit NOT NULL DEFAULT(0)
END;

-- BA_Role
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BA_Role' AND COLUMN_NAME = 'HideOnDisplayForm')
BEGIN
	ALTER TABLE BA_Role ADD HideOnDisplayForm bit NOT NULL DEFAULT(0)
END;

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BA_Role' AND COLUMN_NAME = 'HideOnNewForm')
BEGIN
	ALTER TABLE BA_Role ADD HideOnNewForm bit NOT NULL DEFAULT(0)
END;

IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BA_Role' AND COLUMN_NAME = 'HideOnEditForm')
BEGIN
	ALTER TABLE BA_Role ADD HideOnEditForm bit NOT NULL DEFAULT(0)
END;