59 |
|
FUpgradeLog: TStrings; |
60 |
|
FTargetVersionNo: integer; |
61 |
|
FUpgradeConf: TUpgradeConfFile; |
62 |
+ |
FSectionHeaderTemplate: string; |
63 |
|
FArchiveStub: string; |
64 |
|
procedure DoUpdate(Data: PtrInt); |
65 |
|
function CurrentDBVersionNo: integer; |
81 |
|
function RunUpgradeDatabase(aDatabase: TIBDatabase; |
82 |
|
aBackupService: TIBXServerSideBackupService; |
83 |
|
UpgradeConf: TUpgradeConfFile; |
84 |
+ |
SectionHeaderTemplate: string; |
85 |
|
ArchiveStub: string; |
86 |
|
TargetVersionNo: integer; |
87 |
|
aOnGetDatabaseVersionNo: TGetDatabaseVersionNo; |
102 |
|
sUpdateFailed = 'Update Failed - %s'; |
103 |
|
|
104 |
|
function RunUpgradeDatabase(aDatabase: TIBDatabase; |
105 |
< |
aBackupService: TIBXServerSideBackupService; |
106 |
< |
UpgradeConf: TUpgradeConfFile; ArchiveStub: string; TargetVersionNo: integer; |
105 |
> |
aBackupService: TIBXServerSideBackupService; UpgradeConf: TUpgradeConfFile; |
106 |
> |
SectionHeaderTemplate: string; ArchiveStub: string; TargetVersionNo: integer; |
107 |
|
aOnGetDatabaseVersionNo: TGetDatabaseVersionNo; |
108 |
|
aOnUpgradeStepCompleted: TNotifyEvent): boolean; |
109 |
|
begin |
115 |
|
FTargetVersionNo := TargetVersionNo; |
116 |
|
FBackupService := aBackupService; |
117 |
|
FUpgradeConf := UpgradeConf; |
118 |
+ |
FSectionHeaderTemplate := SectionHeaderTemplate; |
119 |
|
FArchiveStub := ArchiveStub; |
120 |
|
IBXScript.Database := aDatabase; |
121 |
|
UpdateTransaction.DefaultDatabase := aDatabase; |
188 |
|
repeat |
189 |
|
if CurVersionNo >= FTargetVersionNo then break; |
190 |
|
LastVersionNo := CurVersionNo; |
191 |
< |
UpdateAvailable := FUpgradeConf.GetUpgradeInfo(CurVersionNo+1,UpgradeInfo); |
191 |
> |
UpdateAvailable := FUpgradeConf.GetUpgradeInfo(FSectionHeaderTemplate,CurVersionNo+1,UpgradeInfo); |
192 |
|
if UpdateAvailable then |
193 |
|
begin |
194 |
|
if UpgradeInfo.BackupDB and (FBackupService <> nil) then |