Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #182: Also create missing field storages in update hook. #184

Conversation

donquixote
Copy link

OPENEUROPA-[Insert ticket number here]

(none yet)
The github issue is #182.

Description

The update oe_media_iframe_post_update_00005() attempts to create missing fields (field instances) in the 'iframe' media bundle.
However, if the field bases (storages) are also missing, it will fail.
This happened in a project I am working on.

Change in the PR

I am adding instructions in the update hook that also add the field storages, if they are missing.

How will this affect different projects?

  • If the update hook has already run successfully, then we can assume the field storages were already there. So no need to do anything for those projects.
  • If the field storages did not exist before, we assume that the hook has not run yet.

Therefore it seems safe to just add the instructions to the existing update hook, instead of adding a new update hook.

Change log

  • Added:
  • Changed:
  • Deprecated:
  • Removed:
  • Fixed:
  • Security:

Commands

[Insert commands here]

@brummbar
Copy link
Contributor

brummbar commented Oct 6, 2022

We decided that when we are creating field instances, if the storages have been deleted, we bail out and not force the recreation of the storages. This means that, once a developer makes the decision to not have some fields in their system, we honor that decision. From that moment on it's the developer responsibility to create the missing fields in case they need them.

@brummbar brummbar closed this Oct 6, 2022
@brummbar brummbar deleted the issue-182-oe_media_iframe-update-missing-field-storages branch October 6, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants