/**
  * Called by {@link SapphireTest} when the database is reset.
  * @todo Reduce the coupling between this and SapphireTest, somehow.
  */
 public static function on_db_reset()
 {
     // Drop all temporary tables
     $db = DB::getConn();
     foreach (self::$archive_tables as $tableName) {
         if (method_exists($db, 'dropTable')) {
             $db->dropTable($tableName);
         } else {
             $db->query("DROP TABLE \"{$tableName}\"");
         }
     }
     // Remove references to them
     self::$archive_tables = array();
 }