function setUp()
 {
     $this->setMwGlobals('wgContentHandlerUseDB', false);
     $dbw = wfGetDB(DB_MASTER);
     $page_table = $dbw->tableName('page');
     $revision_table = $dbw->tableName('revision');
     $archive_table = $dbw->tableName('archive');
     if ($dbw->fieldExists($page_table, 'page_content_model')) {
         $dbw->query("alter table {$page_table} drop column page_content_model");
         $dbw->query("alter table {$revision_table} drop column rev_content_model");
         $dbw->query("alter table {$revision_table} drop column rev_content_format");
         $dbw->query("alter table {$archive_table} drop column ar_content_model");
         $dbw->query("alter table {$archive_table} drop column ar_content_format");
     }
     parent::setUp();
 }
 function tearDown()
 {
     global $wgContentHandlerUseDB;
     parent::tearDown();
     $wgContentHandlerUseDB = $this->saveContentHandlerNoDB;
 }