Permalink
Browse files

Implement initializeDoctrineTypeMappings function. This function has …

…the current types Akiban Server supports. As Akiban Server supports more types, this function will need to be updated.
  • Loading branch information...
posulliv committed Aug 13, 2012
1 parent 8703c4c commit 8fde2b7af4f8b85aba6d6927e6abc984c3a3a4f9
Showing with 22 additions and 1 deletion.
  1. +22 −1 lib/Doctrine/DBAL/Platforms/AkibanServerPlatform.php
@@ -480,7 +480,28 @@ public function getTruncateTableSQL($tableName, $cascade = false)
protected function initializeDoctrineTypeMappings()
{
- // TODO
+ $this->doctrineTypeMapping = array(
+ 'smallint' => 'smallint',
+ 'serial' => 'integer',
+ 'int' => 'integer',
+ 'integer' => 'integer',
+ 'bigserial' => 'bigint',
+ 'bigint' => 'bigint',
+ 'boolean' => 'boolean',
+ 'varchar' => 'string',
+ 'char' => 'string',
+ 'date' => 'date',
+ 'datetime' => 'datetime',
+ 'timestamp' => 'datetime',
+ 'time' => 'time',
+ 'float' => 'float',
+ 'double' => 'float',
+ 'real' => 'float',
+ 'decimal' => 'decimal',
+ 'numeric' => 'decimal',
+ 'year' => 'date',
+ 'blob' => 'blob',
+ );
}
public function getVarcharMaxLength()

0 comments on commit 8fde2b7

Please sign in to comment.