Permalink
Browse files

BUGFIX Fixed column names that were not quoted that broke PostgreSQL

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110944 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 92c04a6 commit ae89969321307e01bc0415f793bcaeb9001364d7 @halkyon halkyon committed with sminnee Sep 20, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 core/model/Versioned.php
  2. +1 −1 tests/model/VersionedTest.php
View
@@ -337,7 +337,7 @@ function augmentDatabase() {
if(is_array($effectedIDs)) {
foreach($effectedIDs as $key => $value) {
- DB::query("DELETE FROM \"{$table}_versions\" WHERE \"{$table}_versions\".ID = '$value'");
+ DB::query("DELETE FROM \"{$table}_versions\" WHERE \"{$table}_versions\".\"ID\" = '$value'");
}
}
}
@@ -31,7 +31,7 @@ function testDeletingOrphanedVersions() {
DB::query("DELETE FROM \"VersionedTest_DataObject_versions\" WHERE \"RecordID\" = $obj->ID");
// insert a record with no primary key (ID)
- DB::query("INSERT INTO \"VersionedTest_DataObject_versions\" (RecordID) VALUES ($obj->ID)");
+ DB::query("INSERT INTO \"VersionedTest_DataObject_versions\" (\"RecordID\") VALUES ($obj->ID)");
// run the script which should clean that up
$obj->augmentDatabase();

0 comments on commit ae89969

Please sign in to comment.