diff --git a/.travis.yml b/.travis.yml index d9258f5..e892027 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: - php: 7.1 env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_COVERAGE_TEST=1 - php: 7.2 - env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 + env: DB=PGSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 before_script: # Init PHP @@ -24,6 +24,7 @@ before_script: # Install composer dependencies - composer validate - composer require --no-update silverstripe/recipe-cms:$RECIPE_VERSION + - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev; fi - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile script: diff --git a/code/Model/EditableFormField.php b/code/Model/EditableFormField.php index 886f303..826b401 100755 --- a/code/Model/EditableFormField.php +++ b/code/Model/EditableFormField.php @@ -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"); } /** diff --git a/code/Model/Recipient/EmailRecipient.php b/code/Model/Recipient/EmailRecipient.php index 86813dd..4a3a546 100644 --- a/code/Model/Recipient/EmailRecipient.php +++ b/code/Model/Recipient/EmailRecipient.php @@ -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() diff --git a/code/Model/Submission/SubmittedForm.php b/code/Model/Submission/SubmittedForm.php index 11203e7..06128a4 100755 --- a/code/Model/Submission/SubmittedForm.php +++ b/code/Model/Submission/SubmittedForm.php @@ -42,7 +42,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"); } /**