Property | Type | Description | |
---|---|---|---|
$connection | Pagekit\Database\Connection | ||
$manager | Doctrine\DBAL\Schema\AbstractSchemaManager | ||
$schema | Doctrine\DBAL\Schema\Schema |
Method | Description | |
---|---|---|
__call ( string $method, array $args ) : mixed | Proxy method call to database schema manager. | |
__construct ( Pagekit\Database\Connection $connection ) | Constructor. | |
createConstraint ( Doctrine\DBAL\Schema\Constraint $constraint, $table ) | {@see AbstractSchemaManager::createConstraint} | |
createForeignKey ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey, $table ) | {@see AbstractSchemaManager::createForeignKey} | |
createIndex ( Doctrine\DBAL\Schema\Index $index, $table ) | {@see AbstractSchemaManager::createIndex} | |
createTable ( string $table, Closure $callback ) | Creates a new database table. | |
dropAndCreateConstraint ( Doctrine\DBAL\Schema\Constraint $constraint, $table ) | {@see AbstractSchemaManager::dropAndCreateConstraint} | |
dropAndCreateForeignKey ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey, $table ) | {@see AbstractSchemaManager::dropAndCreateForeignKey} | |
dropAndCreateIndex ( Doctrine\DBAL\Schema\Index $index, $table ) | {@see AbstractSchemaManager::dropAndCreateIndex} | |
dropAndCreateTable ( $table ) | {@see AbstractSchemaManager::dropAndCreateTable} | |
dropConstraint ( Doctrine\DBAL\Schema\Constraint $constraint, $table ) | {@see AbstractSchemaManager::dropConstraint} | |
dropForeignKey ( $foreignKey, $table ) | {@see AbstractSchemaManager::dropForeignKey} | |
dropIndex ( $index, $table ) | {@see AbstractSchemaManager::dropIndex} | |
dropTable ( $table ) | ||
getSchemaManager ( ) : Doctrine\DBAL\Schema\AbstractSchemaManager | Return the DBAL schema manager. | |
getTable ( string $table ) : |
Returns an existing database table. | |
listTableColumns ( $table, $database = null ) | {@see AbstractSchemaManager::listTableColumns} | |
listTableDetails ( $tableName ) | {@see AbstractSchemaManager::listTableDetails} | |
listTableForeignKeys ( $table, $database = null ) | {@see AbstractSchemaManager::listTableForeignKeys} | |
listTableIndexes ( $table ) | {@see AbstractSchemaManager::listTableIndexes} | |
migrate ( ) : Doctrine\DBAL\Schema\Schema | Migrates the database. | |
renameTable ( $name, $newName ) | {@see AbstractSchemaManager::renameTable} | |
tableExists ( string $table ) : boolean | Returns true if the given table exists. | |
tablesExist ( array $tables ) : boolean | Returns true if all the given tables exist. |
Method | Description | |
---|---|---|
replacePrefix ( string $query ) : string | Replaces the table prefix placeholder with actual one. |
public __construct ( Pagekit\Database\Connection $connection ) | ||
$connection | Pagekit\Database\Connection |
public createConstraint ( Doctrine\DBAL\Schema\Constraint $constraint, $table ) | ||
$constraint | Doctrine\DBAL\Schema\Constraint |
public createForeignKey ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey, $table ) | ||
$foreignKey | Doctrine\DBAL\Schema\ForeignKeyConstraint |
public createIndex ( Doctrine\DBAL\Schema\Index $index, $table ) | ||
$index | Doctrine\DBAL\Schema\Index |
public createTable ( string $table, Closure $callback ) | ||
$table | string | |
$callback | Closure |
public dropAndCreateConstraint ( Doctrine\DBAL\Schema\Constraint $constraint, $table ) | ||
$constraint | Doctrine\DBAL\Schema\Constraint |
public dropAndCreateForeignKey ( Doctrine\DBAL\Schema\ForeignKeyConstraint $foreignKey, $table ) | ||
$foreignKey | Doctrine\DBAL\Schema\ForeignKeyConstraint |
public dropAndCreateIndex ( Doctrine\DBAL\Schema\Index $index, $table ) | ||
$index | Doctrine\DBAL\Schema\Index |
public dropAndCreateTable ( $table ) |
public dropConstraint ( Doctrine\DBAL\Schema\Constraint $constraint, $table ) | ||
$constraint | Doctrine\DBAL\Schema\Constraint |
public dropForeignKey ( $foreignKey, $table ) |
public dropIndex ( $index, $table ) |
public getSchemaManager ( ) : Doctrine\DBAL\Schema\AbstractSchemaManager | ||
return | Doctrine\DBAL\Schema\AbstractSchemaManager |
public listTableColumns ( $table, $database = null ) |
public listTableDetails ( $tableName ) |
public listTableForeignKeys ( $table, $database = null ) |
public listTableIndexes ( $table ) |
public migrate ( ) : Doctrine\DBAL\Schema\Schema | ||
return | Doctrine\DBAL\Schema\Schema |
public renameTable ( $name, $newName ) |
protected replacePrefix ( string $query ) : string | ||
$query | string | |
return | string |
public tableExists ( string $table ) : boolean | ||
$table | string | |
return | boolean |
public tablesExist ( array $tables ) : boolean | ||
$tables | array | |
return | boolean |
protected Connection,Pagekit\Database $connection | ||
return | Pagekit\Database\Connection |
protected AbstractSchemaManager,Doctrine\DBAL\Schema $manager | ||
return | Doctrine\DBAL\Schema\AbstractSchemaManager |