Commit f524e570 by mdmunir Committed by Qiang Xue

use 'ON DELETE SET NULL' instead of 'ON DELETE CASCADE'

parent e9a3df75
...@@ -285,7 +285,7 @@ class DbManager extends BaseManager ...@@ -285,7 +285,7 @@ class DbManager extends BaseManager
{ {
if (!$this->supportsCascadeUpdate()) { if (!$this->supportsCascadeUpdate()) {
$this->db->createCommand() $this->db->createCommand()
->delete($this->itemTable, ['rule_name' => $rule->name]) ->update($this->itemTable, ['rule_name' => null], ['rule_name' => $name])
->execute(); ->execute();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment