After applying the views-integration patch (https://www.drupal.org/node/965720#comment-11183063) I received quite a few notices/warnings about the foreign-keys. These are not correctly defined.

Comments

SpadXIII created an issue. See original summary.

spadxiii’s picture

Status: Active » Needs review
StatusFileSize
new1.65 KB

A small patch to fix the schema.

ruudvanoijen’s picture

StatusFileSize
new3.18 KB

Fine patch. Added an update hook for adding the foreign keys when schema already exists.

tvoesenek’s picture

Status: Needs review » Needs work
StatusFileSize
new3.22 KB

Fixed a bug in the last version of the patch (#3), which set foreign keys on the wrong table.

tvoesenek’s picture

Status: Needs work » Needs review
mvwensen’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks better this way and seems to work for me, but an interdiff should be nice in this case.
https://www.drupal.org/documentation/git/interdiff

hass’s picture

I thought foreign keys are just documentation. Why do we need to run the update hook?

https://www.drupal.org/docs/7/api/schema-api/schema-reference

Note: Foreign key definitions were added in Drupal 7 for documentation purposes only, and do not modify the database.

hass’s picture

Status: Reviewed & tested by the community » Needs work

Aside, how have you guys found this bugs? :-) Schema modules does not warn, nor do I see any warning somewhere else?

  • hass committed 5137713 on 8.x-1.x authored by Tom Voesenek
    Issue #2831125 by SpadXIII, Tom Voesenek, ruudvanoijen: Fix foreign keys...

  • hass committed 623819d on 7.x-1.x authored by Tom Voesenek
    Issue #2831125 by SpadXIII, Tom Voesenek, ruudvanoijen: Fix foreign keys...
hass’s picture

Status: Needs work » Fixed

Committed without linkchecker_update_7014().

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.