Example #1
0
 /**
  * Add db state to migration
  *
  * @param string|null $module
  * @param string| $migration
  */
 protected function updateDbState($module, $migration)
 {
     $db = new Database($this->db, array('blacklist' => $this->options['migrationsSchemaTable']));
     $sql = new Sql($this->db);
     $update = $sql->update($this->getMigrationsSchemaTable());
     $where = new Where();
     $where->equalTo('module', $module)->and->equalTo('migration', $migration);
     $update->where($where);
     $update->set(array('state' => $db->toString()));
     $selectString = $sql->getSqlStringForSqlObject($update);
     $this->db->query($selectString, Adapter::QUERY_MODE_EXECUTE);
 }