-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
CRM-18464 use safe drop foreign key function to resolve upgrade error… #9679
Conversation
@@ -119,6 +119,7 @@ public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) { | |||
* @param string $rev | |||
*/ | |||
public function upgrade_4_7_alpha1($rev) { | |||
$this->addTask('Drop action schedule mapping foreign key', 'dropActionScheudleMappingForeignKey'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scheudle
* | ||
* @return bool | ||
*/ | ||
public static function dropActionScheudleMappingForeignKey(CRM_Queue_TaskContext $ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, +1 for more guarded schema changes.
a0c0a65
to
9ef9434
Compare
So I did a test run of 9ef9434 roughly as follows:
The schema ends up slightly different -- i.e. the old code has
Is that the intended effect? Does this mean the old code was misbehaving? |
I think so i have a feeling it may have not 100% but that is strange, I would expect the foreign key to be dropped. |
jenkins, test this please |
@totten is this ready to merge? |
… and also drop Index with same name as foreign key being dropped if it exists
9ef9434
to
45412b5
Compare
Confirmed that the new upgrade logic produces the same schema as the old upgrade logic (but with safer code). |
CRM-18464 use safe drop foreign key function to resolve upgrade error…
… and also drop Index with same name as foreign key being dropped if it exists
https://issues.civicrm.org/jira/browse/CRM-18464