mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE: fields now detected properly upon dev/rebuild in MSSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72965 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ea8030d955
commit
0d1846ac59
@ -347,9 +347,11 @@ abstract class Database extends Object {
|
|||||||
|
|
||||||
// Collations didn't come in until MySQL 4.1. Anything earlier will throw a syntax error if you try and use
|
// Collations didn't come in until MySQL 4.1. Anything earlier will throw a syntax error if you try and use
|
||||||
// collations.
|
// collations.
|
||||||
|
// TODO: move this to the MySQLDatabase file, or drop it altogether?
|
||||||
if(!$this->supportsCollations()) {
|
if(!$this->supportsCollations()) {
|
||||||
$spec = eregi_replace(' *character set [^ ]+( collate [^ ]+)?( |$)','\\2',$spec);
|
$spec = eregi_replace(' *character set [^ ]+( collate [^ ]+)?( |$)','\\2',$spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($this->tableList[strtolower($table)])) $newTable = true;
|
if(!isset($this->tableList[strtolower($table)])) $newTable = true;
|
||||||
|
|
||||||
if(!$newTable && !isset($this->fieldList[$table])) {
|
if(!$newTable && !isset($this->fieldList[$table])) {
|
||||||
@ -362,7 +364,7 @@ abstract class Database extends Object {
|
|||||||
else $specValue=$spec;
|
else $specValue=$spec;
|
||||||
|
|
||||||
// We need to get db-specific versions of the ID column:
|
// We need to get db-specific versions of the ID column:
|
||||||
if($spec_orig==DB::getConn()->IdColumn())
|
if($spec_orig==DB::getConn()->IdColumn() || $spec_orig==DB::getConn()->IdColumn(true))
|
||||||
$specValue=DB::getConn()->IdColumn(true);
|
$specValue=DB::getConn()->IdColumn(true);
|
||||||
|
|
||||||
if(!$newTable) {
|
if(!$newTable) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user