PHP Class RainLab\Builder\Classes\MigrationModel

Author: Alexey Bobkov, Samuel Georges
Inheritance: extends RainLab\Builder\Classes\BaseModel
Afficher le fichier Open project: rainlab/builder-plugin Class Usage Examples

Méthodes publiques

Свойство Type Description
$code The migration PHP code string
$description The migration description
$originalScriptFileName
$scriptFileName The migration script file name. Currently only migrations with a single (or none) script file are supported by Builder editors.
$version Migration version string

Protected Properties

Свойство Type Description
$fillable
$originalVersion
$validationRules

Méthodes publiques

Méthode Description
apply ( )
deleteModel ( )
getNextVersion ( )
initVersion ( $versionType )
isApplied ( )
load ( $versionNumber )
makeScriptFileNameUnique ( )
rollback ( )
save ( $executeOnSave = true ) Saves the migration and applies all outstanding migrations for the plugin.
validate ( )

Méthodes protégées

Méthode Description
assignFileName ( )
deleteVersion ( )
getOriginalFileContents ( )
getPluginUpdatesPath ( $fileName = null )
getPluginVersionInformation ( )
insertOrUpdateVersion ( )
loadScriptFile ( )
removeScriptFile ( )
rollbackSaving ( $originalVersionData, $originalScriptFileContents )
rollbackScriptFile ( $fileContents )
rollbackVersionFile ( $fileData )
saveScriptFile ( )

Method Details

apply() public méthode

public apply ( )

assignFileName() protected méthode

protected assignFileName ( )

deleteModel() public méthode

public deleteModel ( )

deleteVersion() protected méthode

protected deleteVersion ( )

getNextVersion() public méthode

public getNextVersion ( )

getOriginalFileContents() protected méthode

protected getOriginalFileContents ( )

getPluginUpdatesPath() protected méthode

protected getPluginUpdatesPath ( $fileName = null )

getPluginVersionInformation() protected méthode

initVersion() public méthode

public initVersion ( $versionType )

insertOrUpdateVersion() protected méthode

protected insertOrUpdateVersion ( )

isApplied() public méthode

public isApplied ( )

load() public méthode

public load ( $versionNumber )

loadScriptFile() protected méthode

protected loadScriptFile ( )

makeScriptFileNameUnique() public méthode

removeScriptFile() protected méthode

protected removeScriptFile ( )

rollback() public méthode

public rollback ( )

rollbackSaving() protected méthode

protected rollbackSaving ( $originalVersionData, $originalScriptFileContents )

rollbackScriptFile() protected méthode

protected rollbackScriptFile ( $fileContents )

rollbackVersionFile() protected méthode

protected rollbackVersionFile ( $fileData )

save() public méthode

Saves the migration and applies all outstanding migrations for the plugin.
public save ( $executeOnSave = true )

saveScriptFile() protected méthode

protected saveScriptFile ( )

validate() public méthode

public validate ( )

Property Details

$code public_oe property

The migration PHP code string
public $code

$description public_oe property

The migration description
public $description

$fillable protected_oe static_oe property

protected static $fillable

$originalScriptFileName public_oe property

public $originalScriptFileName

$originalVersion protected_oe property

protected $originalVersion

$scriptFileName public_oe property

The migration script file name. Currently only migrations with a single (or none) script file are supported by Builder editors.
public $scriptFileName

$validationRules protected_oe property

protected $validationRules

$version public_oe property

Migration version string
public $version