if not exists(select * from Registers where RegisterName = 'service.GuaranteeDep') then insert into Registers(RegisterName,IntStojnost,Komentar) values('service.GuaranteeDep',0,'N на услуга Гаранция депозит') end if; GO if (select count(*) from Registers where RegisterName='SetInventoryToRoom')=0 then insert into Registers(RegisterName,IntStojnost,Komentar) values('SetInventoryToRoom',0,'При 1 се активира функционалността за Начисляване на Инвентар към стая') end if GO if not exists (select * from systable t join syscolumn c on t.table_id = c.table_id and LCase(table_name) = LCase('InventoryOperations') and LCase(column_name) = LCase('RoomN')) then alter table InventoryOperations add RoomN integer default -1 end if; GO if (select count(*) from Registers where RegisterName='AddressCardForeign')>0 then Update Registers set Komentar='Reports=AllBGCards.qri ReportBr=3 Report1=Karton1 Report2=Karton3 Report3=Karton2 Variables+= Karton1Osnovanie=Настанителна заповед Variables-=' where RegisterName='AddressCardForeign'; end if GO if (select count(*) from Registers where RegisterName='AddressCardBulgaria')>0 then Update Registers set Komentar='Reports=AllBGCards.qri ReportBr=3 Report1=Karton1 Report2=Karton3 Report3=Karton2 Variables+= Karton1Osnovanie=Настанителна заповед Variables-=' where RegisterName='AddressCardBulgaria'; end if GO