migration
extends migration
in package
Uses
tools
Module migration base class
Tags
Table of Contents
- $requiredResult : bool
- Result of pre-executed migration, false if one failed
- $config : config
- System config object
- $db : database
- Database object
- $isCli : bool
- CLI execution flag
- __construct() : bool
- Constructor method
- compareVersion() : bool
- Migration execution required due to system version
- getNamespace() : string
- Returns migration class namespace
- isRequired() : bool
- Migration execution required due to system version
- optimizeTables() : bool
- Führt Optimierung der Datenbank-Tabellen durch
- process() : bool
- Execute migrations
- addLangVarPrefix() : string
- Returns language variable with module prefix
- alterTablesAfter() : bool
- Execute additional database table changes
- defaultAddSystemOptions() : bool
- neue System-Optionen bei Update erzeugen
- defaultAlterTables() : bool
- defaultUpdatePermissions() : bool
- aktualisiert Berechtigungen
- getConfig() : config
- Config object getter
- getDB() : config
- Config object getter
- getModuleKey() : string
- Returns modul key based on current class
- getNewVersion() : string
- Returns new version, e. g. from version.txt
- getObject() : module
- Get module object instance
- getPreviewsVersion() : string
- return preview version string
- init() : bool
- Pre-Initializing
- initConstruct() : bool
- Additional initialize process after @see self::__construct
- isCli() : config
- Config object getter
- onDatabase() : array<string|int, mixed>
- Returns a list of database driver names the migration should be executed to, default is MySQL/ MariaDB and Postgres
- output() : void
- Output of migration messages
- updateFileSystem() : bool
- Execute additional file system updates
- updatePermissionsAfter() : bool
- Executes additional permission updates
- updateSystemConfig() : bool
- Execute additional system config updates
Properties
$requiredResult
Result of pre-executed migration, false if one failed
protected
bool
$requiredResult
= true
$config
System config object
private
config
$config
$db
Database object
private
database
$db
$isCli
CLI execution flag
private
bool
$isCli
= null
Methods
__construct()
Constructor method
public
final __construct() : bool
Return values
bool —compareVersion()
Migration execution required due to system version
public
final compareVersion() : bool
Return values
bool —getNamespace()
Returns migration class namespace
public
static getNamespace(string $version) : string
Parameters
- $version : string
Tags
Return values
string —isRequired()
Migration execution required due to system version
public
final isRequired() : bool
Return values
bool —optimizeTables()
Führt Optimierung der Datenbank-Tabellen durch
public
final optimizeTables() : bool
Tags
Return values
bool —process()
Execute migrations
public
final process() : bool
Return values
bool —addLangVarPrefix()
Returns language variable with module prefix
protected
addLangVarPrefix(string $var) : string
Parameters
- $var : string
Return values
string —alterTablesAfter()
Execute additional database table changes
protected
alterTablesAfter() : bool
Return values
bool —defaultAddSystemOptions()
neue System-Optionen bei Update erzeugen
protected
final defaultAddSystemOptions() : bool
Return values
bool —defaultAlterTables()
protected
final defaultAlterTables() : bool
Tags
Return values
bool —defaultUpdatePermissions()
aktualisiert Berechtigungen
protected
final defaultUpdatePermissions() : bool
Return values
bool —getConfig()
Config object getter
protected
final getConfig() : config
Return values
config —getDB()
Config object getter
protected
final getDB() : config
Return values
config —getModuleKey()
Returns modul key based on current class
protected
final getModuleKey() : string
Return values
string —getNewVersion()
Returns new version, e. g. from version.txt
protected
getNewVersion() : string
Return values
string —getObject()
Get module object instance
protected
final getObject([string $key = '' ][, bool $initDb = true ]) : module
Parameters
- $key : string = ''
- $initDb : bool = true
Return values
module —getPreviewsVersion()
return preview version string
protected
final getPreviewsVersion() : string
Return values
string —init()
Pre-Initializing
protected
init() : bool
Return values
bool —initConstruct()
Additional initialize process after @see self::__construct
protected
initConstruct() : bool
Return values
bool —isCli()
Config object getter
protected
final isCli() : config
Return values
config —onDatabase()
Returns a list of database driver names the migration should be executed to, default is MySQL/ MariaDB and Postgres
protected
onDatabase() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —output()
Output of migration messages
protected
final output(string $str[, bool $log = false ]) : void
Parameters
- $str : string
- $log : bool = false
Tags
Return values
void —updateFileSystem()
Execute additional file system updates
protected
updateFileSystem() : bool
Return values
bool —updatePermissionsAfter()
Executes additional permission updates
protected
updatePermissionsAfter() : bool
Return values
bool —updateSystemConfig()
Execute additional system config updates
protected
updateSystemConfig() : bool