v1.0.0
English

Forge.php

system/Database/Forge.php
1 class 37 methods

class Forge

The Forge class transforms migrations to executable SQL statements.
__construct (BaseConnection $db) public
getConnection () public
createDatabase (string $dbName, bool $ifNotExists = false) public
databaseExists (string $dbName) private
dropDatabase (string $dbName) public
addKey ($key, bool $primary = false, bool $unique = false, string $keyName = '') public
addPrimaryKey ($key, string $keyName = '') public
addUniqueKey ($key, string $keyName = '') public
addField ($fields) public
addForeignKey ($fieldName = '', string $tableName = '', $tableField = '', string $onUpdate = '', string $onDelete = '', string $fkName = '', ) public
dropKey (string $table, string $keyName, bool $prefixKeyName = true) public
dropKeyAsConstraint (string $table, string $constraintName) protected
_dropKeyAsConstraint (string $table, string $constraintName) protected
dropPrimaryKey (string $table, string $keyName = '') public
dropForeignKey (string $table, string $foreignName) public
createTable (string $table, bool $ifNotExists = false, array $attributes = []) public
_createTable (string $table, bool $ifNotExists, array $attributes) protected
_createTableAttributes (array $attributes) protected
dropTable (string $tableName, bool $ifExists = false, bool $cascade = false) public
_dropTable (string $table, bool $ifExists, bool $cascade) protected
renameTable (string $tableName, string $newTableName) public
addColumn (string $table, $fields) public
dropColumn (string $table, $columnNames) public
modifyColumn (string $table, $fields) public
_alterTable (string $alterType, string $table, $processedFields) protected
_processFields (bool $createTable = false) protected
_processColumn (array $processedField) protected
_attributeType (array &$attributes) protected
_attributeUnsigned (array &$attributes, array &$field) protected
_attributeDefault (array &$attributes, array &$field) protected
_attributeUnique (array &$attributes, array &$field) protected
_attributeAutoIncrement (array &$attributes, array &$field) protected
_processPrimaryKeys (string $table, bool $asQuery = false) protected
processIndexes (string $table) public
_processIndexes (string $table, bool $asQuery = false) protected
_processForeignKeys (string $table, bool $asQuery = false) protected
reset () public
phpDG v1.0.0 Forge.php 662 files 498 classes 763 fn
Generated