parent
a2d69c5d8e
commit
fcfff27a76
@ -123,7 +123,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
|
||||
*/
|
||||
public function getPortableDeclaration($field)
|
||||
{
|
||||
$db_type = preg_replace('/\d/','', strtolower($field['type']) );
|
||||
$db_type = preg_replace('/[\d\(\)]/','', strtolower($field['type']) );
|
||||
$length = (isset($field['length']) && $field['length'] > 0) ? $field['length'] : null;
|
||||
|
||||
$type = array();
|
||||
@ -137,6 +137,8 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
|
||||
case 'bit':
|
||||
$type[0] = 'boolean';
|
||||
break;
|
||||
case 'tinyint':
|
||||
case 'smallint':
|
||||
case 'int':
|
||||
$type[0] = 'integer';
|
||||
if ($length == 1) {
|
||||
|
@ -73,6 +73,8 @@ class Doctrine_Import_Mssql extends Doctrine_Import
|
||||
$type .= '(' . $val['length'] . ')';
|
||||
}
|
||||
|
||||
$val['type'] = $type;
|
||||
$val['identity'] = $identity;
|
||||
$decl = $this->conn->dataDict->getPortableDeclaration($val);
|
||||
|
||||
$description = array(
|
||||
@ -112,7 +114,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import
|
||||
*/
|
||||
public function listTables($database = null)
|
||||
{
|
||||
$sql = "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name";
|
||||
$sql = "SELECT name FROM sysobjects WHERE type = 'U' AND name <> 'dtproperties' ORDER BY name";
|
||||
|
||||
return $this->conn->fetchColumn($sql);
|
||||
}
|
||||
@ -196,4 +198,4 @@ class Doctrine_Import_Mssql extends Doctrine_Import
|
||||
|
||||
return $this->conn->fetchColumn($query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user