--V1.7.2所作升级
if exists( Select OptValue from tSysOpt where OptName='DBEdition')
begin
  Declare @DBVer varchar(10)
  Select @DBVer=OptValue from tSysOpt where OptName='DBEdition'
  Set @DBVer=Substring(@DBVer,1,4)+'-'+Substring(@DBVer,6,2)+'-'+Substring(@DBVer,9,2)
  if @DBVer>='2007-04-25'
    Return
end
--添加SchemeCode字段
if not Exists(Select * from SysColumns where Id=Object_ID('tUser') and name='SchemeCode' )
begin
  alter table tUser add SchemeCode varchar(6) Default '' with Values 
  Exec ('Update tUser  set SchemeCode=''''   ')
end