IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'AutocreateTeamWithO365Group'
      AND Object_ID = Object_ID(N'BA_SiteType'))
BEGIN
	ALTER TABLE BA_SiteType ADD AutocreateTeamWithO365Group bit  NOT NULL default(0)
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'TeamUrl'
      AND Object_ID = Object_ID(N'BA_Site'))
BEGIN
	ALTER TABLE BA_Site ADD TeamUrl nvarchar(max) NULL
	ALTER TABLE BA_Site ADD TeamId uniqueidentifier NULL
END