From 0c5e363a68655ae3a906d837336b459445e33984 Mon Sep 17 00:00:00 2001 From: Geoff Munn Date: Tue, 17 Feb 2009 03:54:39 +0000 Subject: [PATCH] API CHANGE: 'ID' columns now no longer appear as being changed in Postgres git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71943 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Database.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/model/Database.php b/core/model/Database.php index 6084b2071..0746930fb 100755 --- a/core/model/Database.php +++ b/core/model/Database.php @@ -333,6 +333,7 @@ abstract class Database extends Object { //Convert the $spec array into a database-specific string $spec=DB::getConn()->$spec['type']($spec['parts'], true); } + // Collations didn't come in until MySQL 4.1. Anything earlier will throw a syntax error if you try and use // collations. if(!$this->supportsCollations()) { @@ -355,6 +356,10 @@ abstract class Database extends Object { if(is_array($spec_orig)) $spec_orig=DB::getConn()->$spec_orig['type']($spec_orig['parts']); + if($spec_orig==DB::getConn()->IdColumn()){ + $specValue=DB::getConn()->IdColumn(true); + } + if($newTable || $fieldValue=='') { Profiler::mark('createField');