Skip to content

862 constraint between fs_betrieb_kategorie and fs_betrieb added

Guenter Muehldorfer requested to merge 862_Guenter_betrieb_kategorie_id into master

Closes 862

What does this MR do?

adds a constraint between fs_betrieb_kategorie and fs_betrieb. Therefore it was requried to change the implementation of the Store model so that NULL instead of 0 is written to the datbase in case no category is provided

How confident are you it won't break things if deployed?

very confident

Links to related issues

n.a.

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. Run ./scripts/start and ./scripts/seed
  3. Login to front end
  4. Add new store without selected category (check in phpMyAdmin that fs_betrieb.betrieb_kategorie_id shows NULL)
  5. Update store with selected category (check in phpMyAdmin that fs_betrieb.betrieb_kategorie_id shows assigned ID
  6. Update store with deselected category (check in phpMyAdmin that fs_betrieb.betrieb_kategorie_id again shown NULL).

Screenshots (if applicable)

Any relevant screenshots if this is a design / frontend change

Checklist

  • test not required as functionality isn't changed. That's just a housekeeping change.
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings

Merge request reports

Loading