mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00:00
BUGFIX Fixed SQL server case where text size limit for varchar and text was too small (probably imposed by FreeTDS) so we need to force a 2GB maximum
BUGFIX MSSQLDatabase::text() should return "varchar(max)" as text is deprecated (see http://msdn.microsoft.com/en-us/library/ms187993.aspx)
This commit is contained in:
parent
3abcfaf833
commit
42d70770f0
@ -56,6 +56,7 @@ class MSSQLDatabase extends Database {
|
|||||||
// Configure the connection
|
// Configure the connection
|
||||||
$this->query('SET QUOTED_IDENTIFIER ON');
|
$this->query('SET QUOTED_IDENTIFIER ON');
|
||||||
}
|
}
|
||||||
|
$this->query('SET TEXTSIZE 2147483647');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -810,9 +811,9 @@ class MSSQLDatabase extends Database {
|
|||||||
*/
|
*/
|
||||||
public function text($values, $asDbValue=false){
|
public function text($values, $asDbValue=false){
|
||||||
if($asDbValue)
|
if($asDbValue)
|
||||||
return Array('data_type'=>'text');
|
return Array('data_type'=>'varchar(max)');
|
||||||
else
|
else
|
||||||
return 'text null';
|
return 'varchar(max) null';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user