Revize 787
Přidáno uživatelem Michal Kliment před téměř 14 roky(ů)
freenetis/trunk/kohana/application/libraries/MY_Controller.php | ||
---|---|---|
$config->set_db_schema_version($i);
|
||
}
|
||
}
|
||
|
||
// do SQL queries from upgrade_sql file
|
||
try
|
||
{
|
||
/*if (!$this->db->query('SET AUTOCOMMIT=0'))
|
||
{
|
||
throw new Kohana_Database_Exception();
|
||
}
|
||
|
||
if (!$this->db->query('BEGIN'))
|
||
{
|
||
throw new Kohana_Database_Exception();
|
||
}*/
|
||
|
||
foreach ($this->upgrade_sql[$this->current_svn_db_schema_version] as $query)
|
||
{
|
||
if(!$this->db->query($query))
|
||
{
|
||
throw new Kohana_Database_Exception();
|
||
}
|
||
}
|
||
|
||
/*if (!$this->db->query('COMMIT'))
|
||
{
|
||
throw new Kohana_Database_Exception();
|
||
}
|
||
|
||
if (!$this->db->query('SET AUTOCOMMIT=1'))
|
||
{
|
||
throw new Kohana_Database_Exception();
|
||
}*/
|
||
}
|
||
catch (Kohana_Database_Exception $e)
|
||
{
|
||
/*$this->db->query('ROLLBACK');
|
||
$this->db->query('SET AUTOCOMMIT=1');*/
|
||
|
||
$message = "SVN: $i <br />"
|
||
.url_lang::lang('texts.file').": upgrade_sql.php<br /><br />
|
||
$query";
|
||
$this->error(UPGRADE, $message);
|
||
}
|
||
// set up db schema
|
||
$config->set_db_schema_version($this->current_svn_db_schema_version);
|
||
}
|
||
|
||
|
Také k dispozici: Unified diff
Mensi oprava - pri upgradu SQL se nevykonaly dotazy ze samotneho upgrade_sql.php.