Merge pull request #1085 from GuySartorelli/patch-1

Fix: Allow removing the Versioned extension from EditableFormField
This commit is contained in:
Steve Boyd 2021-08-06 10:33:26 +12:00 committed by GitHub
commit 686a7295ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -345,8 +345,10 @@ class EditableFormField extends DataObject
// 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");
if (self::has_extension(Versioned::class)) {
DB::query("UPDATE \"EditableFormField_Live\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
DB::query("UPDATE \"EditableFormField_Versions\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
}
}
/**