diff --git a/code/Model/EditableFormField.php b/code/Model/EditableFormField.php index f923b87..41e3496 100755 --- a/code/Model/EditableFormField.php +++ b/code/Model/EditableFormField.php @@ -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"); + } } /**