Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SpadXIII created an issue. See original summary.

SpadXIII’s picture

ruudvanoijen’s picture

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

TVoesenek’s picture

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.