* Db/Database.php - Added createTable() to create table from meta-information * Db/MySQLDB.php - Overridden _columnDef() to handle specialties for createTable() * Db/Table.php - Added meta-information to create() table from it (uses Database::createTable()) * Db/MySQLTable.php - Overridden _createOptions() to handle specialties for Table::create()
/trunk/Db/MySQLDB.php |
---|
63,6 → 63,20 |
} |
/** |
* (non-PHPdoc) |
* @see \PointedEars\PHPX\Db\Database::_columnDef() |
*/ |
protected function _columnDef (array $data, $columnName) |
{ |
$standard_Def = parent::_columnDef($data, $columnName); |
$mySQL_def = $standardDef |
. (isset($data['format']) && $data['format'] ? " COLUMN_FORMAT {$data['format']}" : '') |
. (isset($data['storage']) && $data['storage'] ? " STORAGE {$data['storage']}" : ''); |
return $mySQL_def; |
} |
/** |
* Creates this MySQL database |
* |
* @param string $dsn |