Hi guys,
We try to update some record in db at migration, but it fails different ways.
What we want to do is:
update category set rgt = right + 2
It try to insert ‘rgt + 2’ as string:
$this->update('category', array('rgt'=>new CDbExpression('rgt + 2')))
It try to insert ‘rgt + 2’ as string also:
$this->update('category', array('rgt'=>':rgt'),'',array(':rgt'=>new CDbExpression('rgt + 2')))
How can we do it with CDbMigration?