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

View File

@ -345,9 +345,11 @@ class EditableFormField extends DataObject
// make sure to migrate the class across (prior to v5.x) // 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\" 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_Live\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
DB::query("UPDATE \"EditableFormField_Versions\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL"); DB::query("UPDATE \"EditableFormField_Versions\" SET \"ParentClass\" = 'Page' WHERE \"ParentClass\" IS NULL");
} }
}
/** /**
* Return fields to display on the 'Display Rules' tab * Return fields to display on the 'Display Rules' tab