Documentation

migration extends migration
in package
Uses tools

Module migration base class

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2021, Stefan Seehafer

license

http://www.gnu.org/licenses/gpl.txt GPLv3

since
4.5.1-b1

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

$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
static
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
since
3.3
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
since
5.0.0-b1
Return values
bool

defaultUpdatePermissions()

aktualisiert Berechtigungen

protected final defaultUpdatePermissions() : bool
Return values
bool

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

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
since
4.4.1
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
since
4.3
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
Return values
bool

Search results