38 $this->db->begin( __METHOD__ );
40 if ( !$this->db->tableExists(
'testrun' )
41 || !$this->db->tableExists(
'testitem' )
43 print "WARNING> `testrun` table not found in database. Trying to create table.\n";
45 $this->db->sourceFile( $updater->patchPath( $this->db,
'patch-testrun.sql' ) );
46 echo
"OK, resuming.\n";
49 $this->db->insert(
'testrun',
51 'tr_date' => $this->db->timestamp(),
52 'tr_mw_version' => $this->version,
53 'tr_php_version' => PHP_VERSION,
54 'tr_db_version' => $this->db->getServerVersion(),
55 'tr_uname' => php_uname()
58 if ( $this->db->getType() ===
'postgres' ) {
59 $this->curRun = $this->db->currentSequenceValue(
'testrun_id_seq' );
61 $this->curRun = $this->db->insertId();