declare @a varchar(255)
if exists(select name from sysobjects where xtype='D' and name like '%_REPEAT_%' and 
         parent_obj=(select internal.id from sysobjects internal where internal.name='QX_TASK' and xtype='U'))
begin
    select @a=name from sysobjects where xtype='D' and name like '%_REPEAT_%' and 
                parent_obj=(select internal.id from sysobjects internal where internal.name='QX_TASK' and xtype='U')
    declare @str varchar(1024)
    select @str = 'alter table dbo.qx_task drop constraint ' + @a
    exec(@str)
end
go

ALTER TABLE dbo.QX_TASK DROP COLUMN REPEAT;
go

ALTER TABLE dbo.QX_TASK ADD REPEAT_SIGN NUMERIC(2,0) NULL DEFAULT 0;
go

UPDATE dbo.QX_SYS_PROP SET PROP_VAL = '050' WHERE (PROP_ID = 'DB_CORE_VERSION');
go