From e381fdde41375eb0ece8da0b08a7d4e71f95dd39 Mon Sep 17 00:00:00 2001 From: RQuadling Date: Fri, 1 Feb 2008 16:15:34 +0000 Subject: [PATCH] Ticket: 766,767 --- lib/Doctrine/DataDict/Mssql.php | 3 +++ lib/Doctrine/Import/Mssql.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/DataDict/Mssql.php b/lib/Doctrine/DataDict/Mssql.php index 27c5d6620..21afdcf2c 100644 --- a/lib/Doctrine/DataDict/Mssql.php +++ b/lib/Doctrine/DataDict/Mssql.php @@ -159,8 +159,11 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict break; case 'text': case 'varchar': + case 'ntext': + case 'nvarchar': $fixed = false; case 'char': + case 'nchar': $type[0] = 'string'; if ($length == '1') { $type[] = 'boolean'; diff --git a/lib/Doctrine/Import/Mssql.php b/lib/Doctrine/Import/Mssql.php index cbfce769d..a2535eae7 100644 --- a/lib/Doctrine/Import/Mssql.php +++ b/lib/Doctrine/Import/Mssql.php @@ -85,7 +85,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import 'length' => $decl['length'], 'fixed' => $decl['fixed'], 'unsigned' => $decl['unsigned'], - 'notnull' => (bool) ($val['is_nullable'] === 'NO'), + 'notnull' => (bool) (trim($val['is_nullable']) === 'NO'), 'default' => $val['column_def'], 'primary' => (strtolower($identity) == 'identity'), );