Bug #5580

Add migration to ensure behavior of access_log FK "access_log_FK_1"

Added by Jesús García Crespo over 8 years ago. Updated over 8 years ago.

Status:VerifiedStart date:09/12/2013
Priority:CriticalDue date:
Assignee:José Raddaoui Marín% Done:

100%

Category:InstallationEstimated time:2.00 hours
Target version:Release 2.0.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

Radda, remember the change in arMigration0096 to get the FK doing cascade updates? We need to add that change as a new migration step.

It should look like this:

ALTER TABLE `access_log` DROP FOREIGN KEY `access_log_FK_1`;
ALTER TABLE `access_log` ADD CONSTRAINT `access_log_FK_1` FOREIGN KEY (`object_id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT;

But maybe there is a better way to update existing FK's, I dunno.

Remember to bump the db version also in the 1.x branch and add the class in both branches as we need 1.x users to be up to date even if the db change targets only 2.x.

History

#1 Updated by Jesús García Crespo over 8 years ago

  • Subject changed from Add migration to ensure integrity of access_log FK "access_log_FK_1" to Add migration to ensure behavior of access_log FK "access_log_FK_1"

#2 Updated by Jesús García Crespo over 8 years ago

  • Priority changed from Medium to Critical

#3 Updated by José Raddaoui Marín over 8 years ago

  • Status changed from New to QA/Review
  • % Done changed from 0 to 100

Applied in changeset atom|commit:7e1c2bdbf4debfcf1a06d872202f0244ef521def.

#4 Updated by Jesús García Crespo over 8 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF