mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
MINOR: sqlite properly introduces itself on dev build
This commit is contained in:
parent
98a59cad7b
commit
e76d193b1e
@ -359,7 +359,10 @@ class SQLite3Database extends SS_Database {
|
||||
$ok = true;
|
||||
|
||||
if(!SapphireTest::using_temp_db() && !self::$checked_and_repaired) {
|
||||
$this->alterationMessage("SQLite Version " . $this->getVersion(),"repaired");
|
||||
$class = '';
|
||||
if(get_class($this)=="SQLitePDODatabase") $class = 'PDO';
|
||||
if(get_class($this)=="SQLite3Database") $class = '3';
|
||||
$this->alterationMessage("SQLite$class Version " . $this->query("SELECT sqlite_version()")->value(),"repaired");
|
||||
$this->alterationMessage("Checking database integrity","repaired");
|
||||
if($msgs = $this->query('PRAGMA integrity_check')) foreach($msgs as $msg) if($msg['integrity_check'] != 'ok') { Debug::show($msg['integrity_check']); $ok = false; }
|
||||
$this->query('VACUUM');
|
||||
|
Loading…
Reference in New Issue
Block a user