Browse Source

Fixed the remaining schema tests

Jose Lorenzo Rodriguez 12 years ago
parent
commit
e32fcf4b87
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Database/Schema/SqlserverSchema.php

+ 1 - 2
src/Database/Schema/SqlserverSchema.php

@@ -110,7 +110,7 @@ class SqlserverSchema extends BaseSchema {
 		}
 
 		if (strpos($col, 'varchar') !== false) {
-			return ['type' => 'string', 'length' => $length];
+			return ['type' => 'string', 'length' => $length ?: 255];
 		}
 
 		if (strpos($col, 'char') !== false) {
@@ -151,7 +151,6 @@ class SqlserverSchema extends BaseSchema {
 			'null' => $row['null'] === 'YES' ? true : false,
 			'default' => $row['default'],
 		];
-		$field['length'] = $row['char_length'] ?: $field['length'];
 		$table->addColumn($row['name'], $field);
 	}