FIX Postgres compatibility in requireDefaultRecords database queries

This commit is contained in:
Robbie Averill 2018-08-21 15:04:51 +12:00
parent 1f3fcc865f
commit cc3ea728e4
3 changed files with 5 additions and 5 deletions

View File

@ -327,9 +327,9 @@ class EditableFormField extends DataObject
parent::requireDefaultRecords();
// make sure to migrate the class across (prior to v5.x)
DB::query("UPDATE EditableFormField SET ParentClass = 'Page' WHERE ParentClass IS NULL");
DB::query("UPDATE EditableFormField_Live SET ParentClass = 'Page' WHERE ParentClass IS NULL");
DB::query("UPDATE EditableFormField_Versions SET ParentClass = 'Page' WHERE ParentClass IS NULL");
DB::query("UPDATE \"EditableFormField\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
DB::query("UPDATE \"EditableFormField_Live\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
DB::query("UPDATE \"EditableFormField_Versions\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
}
/**

View File

@ -113,7 +113,7 @@ class EmailRecipient extends DataObject
parent::requireDefaultRecords();
// make sure to migrate the class across (prior to v5.x)
DB::query("UPDATE UserDefinedForm_EmailRecipient SET FormClass = 'Page' WHERE FormClass IS NULL");
DB::query("UPDATE \"UserDefinedForm_EmailRecipient\" SET \"FormClass\" = 'Page' WHERE \"FormClass\" IS NULL");
}
public function summaryFields()

View File

@ -41,7 +41,7 @@ class SubmittedForm extends DataObject
parent::requireDefaultRecords();
// make sure to migrate the class across (prior to v5.x)
DB::query("UPDATE SubmittedForm SET ParentClass = 'Page' WHERE ParentClass IS NULL");
DB::query("UPDATE \"SubmittedForm\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
}
/**