PHP DataVersion
PHP Database Migrations and Seeds.
|
Public Member Functions | |
__construct (string $Host, string $Username, string $Password, string $Database, int $Port=3306) | |
__destruct () | |
versions () | |
version () | |
![]() | |
isConnected () | |
getErrorQuery () | |
getErrorMessage () | |
includeDirectory (string $Directory) | |
migrate () | |
rollback (int $VersionId) | |
seed (array $Seeds) | |
isConnected () | |
getErrorQuery () | |
getErrorMessage () | |
includeDirectory (string $Directory) | |
versions () | |
version () | |
migrate () | |
rollback (int $VersionId) | |
seed (array $Seeds) | |
Protected Member Functions | |
escape (string $UnescapedString) | |
execute (string $Command) | |
statement (array $Commands) | |
query (string $Command) | |
initSchema () | |
getExistsVersion () | |
getRollbackVersion (int $Id) | |
addVersion (string $Name, string $Description="") | |
removeVersion (string $Name) | |
resetVersion () | |
![]() | |
escape (string $UnescapedString) | |
execute (string $Command) | |
statement (array $Commands) | |
query (string $Command) | |
initSchema () | |
getExistsVersion () | |
getRollbackVersion (int $Id) | |
addVersion (string $Name, string $Description="") | |
removeVersion (string $Name) | |
resetVersion () | |
getAllClasses (string $ClassName) | |
getAvailableMigration () | |
getAvailableSeed () | |
withError (string $Message, string $Query="") | |
withoutError () | |
Additional Inherited Members | |
![]() | |
$driver = null | |
$is_connected = false | |
$error_message = "" | |
$error_query = "" | |
$platform = "" | |
$credential = array() | |
Simple MySQL implementation.
Samy\DataVersion\MySql::__construct | ( | string | $Host, |
string | $Username, | ||
string | $Password, | ||
string | $Database, | ||
int | $Port = 3306 |
||
) |
MySql construction.
[in] | string | $Host | MySQL Host |
[in] | string | $Username | MySQL Username |
[in] | string | $Password | MySQL Password |
[in] | string | $Database | MySQL Database |
[in] | int | $Port | MySQL Port |
Samy\DataVersion\MySql::__destruct | ( | ) |
MySql destruction.
|
protected |
Return an instance with added version.
[in] | string | $Name | The version name |
[in] | string | $Description | The version description |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Escapes special characters in a string for use in an SQL statement.
[in] | string | $UnescapedString | The string that is to be escaped |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Return an instance with executed query command.
[in] | string | $Command | The query command |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Retrieve exists version name.
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Retrieve rollback version name.
[in] | int | $Id | The version id |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Return an instance with initialized schema.
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Retrieve records from query command.
[in] | string | $Command | The query command |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Return an instance with removed version.
[in] | string | $Name | The version name |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Return an instance with reset version.
Reimplemented from Samy\DataVersion\AbstractDataVersion.
|
protected |
Return an instance with executed query commands.
[in] | array | $Commands | The query commands |
Reimplemented from Samy\DataVersion\AbstractDataVersion.
Samy\DataVersion\MySql::version | ( | ) |
Retrieve the current versions of migration.
Implements Samy\DataVersion\DataVersionInterface.
Samy\DataVersion\MySql::versions | ( | ) |
Retrieve all versions of migration.
Implements Samy\DataVersion\DataVersionInterface.