ALTER TABLE [VCLib].[T_USER_CONTEXTS] ADD [ReadOnlyState] int NOT NULL CONSTRAINT [df_ReadOnlyState] DEFAULT 0 WITH VALUES
GO

ALTER TABLE [VCLib].[T_USER_CONTEXTS] DROP CONSTRAINT [df_ReadOnlyState]
GO

UPDATE [VCLib].[T_USER_CONTEXTS] SET [ReadOnlyState] = [ReadOnly]

exec dbo.sp_AlterDropColumn '[VCLib].[T_USER_CONTEXTS]' , 'ReadOnly', 0
GO