Class TDBVersioning
Unit
Declaration
type TDBVersioning = class(TObject)
Description
This is the class for managing database schema upgrades
Hierarchy
- TObject
- TDBVersioning
Overview
Methods
![]() |
constructor Create(AConnection: TSQLConnection; ATransaction: TSQLTransaction; ASQLDir: String = ''); |
![]() |
constructor Create(AConnection: TSQLConnection; ATransaction: TSQLTransaction; const ASQLScripts: array of String); |
![]() |
constructor CreateFromResources(AConnection: TSQLConnection; ATransaction: TSQLTransaction; AResourcePrefix: String = 'SQL_SCRIPT_'); |
![]() |
destructor Destroy; override; |
![]() |
procedure UpgradeTo(AVer: Integer); |
![]() |
procedure UpgradeToLatest; |
![]() |
function UpgradeNeeded: Boolean; |
![]() |
function IsInitialized: Boolean; |
Properties
![]() |
property CurrentVersion: Integer read GetCurrentDBVersion; |
![]() |
property LatestVersion: Integer read GetLatestVersion; |
Description
Methods
![]() |
destructor Destroy; override; |
![]() |
procedure UpgradeTo(AVer: Integer); |
|
Upgrade database to specified version. If upgrade fails it rollback all changes to previous state. Parameters
Exceptions raised
| |
![]() |
procedure UpgradeToLatest; |
|
Upgrade database to latest possible version See also | |
![]() |
function UpgradeNeeded: Boolean; |
|
Checks if database can be upgraded to new version (has any not applied upgrades). | |
![]() |
function IsInitialized: Boolean; |
|
Checks if database not empty and has any upgrades applied. For the first run should return | |
Properties
![]() |
property CurrentVersion: Integer read GetCurrentDBVersion; |
|
Returns the version of the database it is in | |
![]() |
property LatestVersion: Integer read GetLatestVersion; |
|
Returns last available for upgrade version | |
Generated by PasDoc 0.16.0. Generated on 2024-11-26 16:46:03.
