USE [EnVisage]
GO

IF EXISTS(SELECT * FROM sys.columns 
            WHERE Name = N'Permanent' AND Object_ID = Object_ID(N'NonProjectTime'))

	UPDATE NonProjectTime
	SET Permanent = 0 WHERE Permanent is null
	go
	ALTER TABLE NonProjectTime
	ALTER COLUMN Permanent bit not null
	go
