PHP Class DbPatch_Command_Patch_SQL

Author: Sandy Pleyte
Author: Martijn De Letter
Author: Rudi de Vries
Inheritance: extends DbPatch_Command_Patch_Abstract
Mostrar archivo Open project: dbpatch/dbpatch

Protected Properties

Property Type Description
$data array

Public Methods

Method Description
apply ( ) : boolean Apply SQL Patch
create ( string $description, string $patchDirectory, string $patchPrefix ) : void Create Empty SQL Patch
fixSqliteSchemaChangedBug ( ) : DbPatch_Command_Patch_SQL Fix "database schema has changed" error
getContents ( ) : string
getDescription ( ) : string Return first line of the SQL Patch
getType ( ) : string

Method Details

apply() public method

Apply SQL Patch
public apply ( ) : boolean
return boolean

create() public method

Create Empty SQL Patch
public create ( string $description, string $patchDirectory, string $patchPrefix ) : void
$description string
$patchDirectory string
$patchPrefix string
return void

fixSqliteSchemaChangedBug() public method

The VACUUM option makes it harder to execute queries while other session (i.e. import command) modify the database. Reconnecting prevents the error.
See also: http://www.mail-archive.com/[email protected]/msg04887.html
public fixSqliteSchemaChangedBug ( ) : DbPatch_Command_Patch_SQL
return DbPatch_Command_Patch_SQL

getContents() public method

public getContents ( ) : string
return string

getDescription() public method

Return first line of the SQL Patch
public getDescription ( ) : string
return string

getType() public method

public getType ( ) : string
return string

Property Details

$data protected_oe property

protected array $data
return array