diff --git a/modules/simpletest/tests/upgrade/drupal-6.statistics.database.php b/modules/simpletest/tests/upgrade/drupal-6.statistics.database.php
new file mode 100644
index 0000000..da75beb
--- /dev/null
+++ b/modules/simpletest/tests/upgrade/drupal-6.statistics.database.php
@@ -0,0 +1,186 @@
+db_create_table('accesslog', array(
+  'fields' => array(
+    'aid' => array(
+      'type' => 'serial',
+      'not null' => TRUE,
+    ),
+    'sid' => array(
+      'type' => 'varchar',
+      'length' => 64,
+      'not null' => TRUE,
+      'default' => '',
+    ),
+    'title' => array(
+      'type' => 'varchar',
+      'length' => 255,
+      'not null' => FALSE,
+    ),
+    'path' => array(
+      'type' => 'varchar',
+      'length' => 255,
+      'not null' => FALSE,
+    ),
+    'url' => array(
+      'type' => 'text',
+      'not null' => FALSE,
+    ),
+    'hostname' => array(
+      'type' => 'varchar',
+      'length' => 128,
+      'not null' => FALSE,
+    ),
+    'uid' => array(
+      'type' => 'int',
+      'unsigned' => TRUE,
+      'not null' => FALSE,
+      'default' => 0,
+    ),
+    'timer' => array(
+      'type' => 'int',
+      'unsigned' => TRUE,
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'timestamp' => array(
+      'type' => 'int',
+      'unsigned' => TRUE,
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+  ),
+  'indexes' => array(
+    'accesslog_timestamp' => array(
+      'timestamp',
+    ),
+    'uid' => array(
+      'uid',
+    ),
+  ),
+  'primary key' => array(
+    'aid',
+  ),
+  'module' => 'statistics',
+  'name' => 'accesslog',
+));
+db_insert('accesslog')->fields(array(
+  'aid',
+  'sid',
+  'title',
+  'path',
+  'url',
+  'hostname',
+  'uid',
+  'timer',
+  'timestamp',
+))
+->values(array(
+  'aid' => '11553624',
+  'sid' => '6f15093602b904daf85f7dcf46d0c189',
+  'title' => 'example.ch',
+  'path' => 'content-overview',
+  'url' => 'http://example.ch/admin/content/backup_migrate/destination/list/files/scheduled',
+  'hostname' => '10.0.0.1',
+  'uid' => '0',
+  'timer' => '6566',
+  'timestamp' => '1308837539',
+))
+->values(array(
+  'aid' => '11553625',
+  'sid' => '6f15093602b904daf85f7dcf46d0c189',
+  'title' => 'Page not found',
+  'path' => 'sites/default/files/hero1_20110325_0.jpg',
+  'url' => 'http://example.ch/',
+  'hostname' => '10.0.0.18',
+  'uid' => '0',
+  'timer' => '1355',
+  'timestamp' => '1308837542',
+))
+->values(array(
+  'aid' => '11553626',
+  'sid' => '6f15093602b904daf85f7dcf46d0c189',
+  'title' => 'Page not found',
+  'path' => 'sites/default/files/Label_SC App of the Year 2011.png',
+  'url' => 'http://example.ch/',
+  'hostname' => '10.0.0.18',
+  'uid' => '0',
+  'timer' => '1361',
+  'timestamp' => '1308837543',
+))
+->values(array(
+  'aid' => '11553627',
+  'sid' => '6f15093602b904daf85f7dcf46d0c189',
+  'title' => 'Bitte einloggen oder registrieren',
+  'path' => 'node/216',
+  'url' => 'http://example.ch/admin/content/backup_migrate/destination/list/files/scheduled',
+  'hostname' => '10.0.0.18',
+  'uid' => '0',
+  'timer' => '654',
+  'timestamp' => '1308837915',
+))
+->values(array(
+  'aid' => '11553628',
+  'sid' => '6f15093602b904daf85f7dcf46d0c189',
+  'title' => 'Page not found',
+  'path' => 'sites/default/files/Label_SC App of the Year 2011.png',
+  'url' => 'http://example.ch/user/1',
+  'hostname' => '10.0.0.1',
+  'uid' => '0',
+  'timer' => '556',
+  'timestamp' => '1308837916',
+))
+->values(array(
+  'aid' => '11553629',
+  'sid' => '6f15093602b904daf85f7dcf46d0c189',
+  'title' => 'Page not found',
+  'path' => 'sites/default/files/hero1_20110325_0.jpg',
+  'url' => 'http://example.ch/user/1',
+  'hostname' => '10.0.0.18',
+  'uid' => '0',
+  'timer' => '540',
+  'timestamp' => '1308837916',
+))
+->values(array(
+  'aid' => '11553751',
+  'sid' => '3ff65de7de8c9e170b1fe858c4339006',
+  'title' => 'example.ch',
+  'path' => 'content-overview',
+  'url' => '',
+  'hostname' => '10.0.0.18',
+  'uid' => '0',
+  'timer' => '1153',
+  'timestamp' => '1309162850',
+))
+->values(array(
+  'aid' => '11553752',
+  'sid' => '1f4039b9dc083eddc3a8bb4a442e5b9e',
+  'title' => 'example.ch',
+  'path' => 'content-overview',
+  'url' => '',
+  'hostname' => '10.0.0.1',
+  'uid' => '0',
+  'timer' => '530',
+  'timestamp' => '1309163125',
+))
+->values(array(
+  'aid' => '11553753',
+  'sid' => '1f4039b9dc083eddc3a8bb4a442e5b9e',
+  'title' => '',
+  'path' => 'content-overview',
+  'url' => '',
+  'hostname' => '10.0.0.1',
+  'uid' => '0',
+  'timer' => '51',
+  'timestamp' => '1309163142',
+))
+->values(array(
+  'aid' => '11553754',
+  'sid' => '1f4039b9dc083eddc3a8bb4a442e5b9e',
+  'title' => '',
+  'path' => 'content-overview',
+  'url' => '',
+  'hostname' => '10.0.0.18',
+  'uid' => '0',
+  'timer' => '54',
+  'timestamp' => '1309163168',
+))
+->execute();
diff --git a/modules/simpletest/tests/upgrade/upgrade.statistics.test b/modules/simpletest/tests/upgrade/upgrade.statistics.test
new file mode 100644
index 0000000..2ed3428
--- /dev/null
+++ b/modules/simpletest/tests/upgrade/upgrade.statistics.test
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * Upgrade test for statistics.module.
+ */
+class StatisticsUpgradePathTestCase extends UpgradePathTestCase {
+  public static function getInfo() {
+    return array(
+      'name'  => 'Statistics upgrade path',
+      'description'  => 'Statistics upgrade path tests.',
+      'group' => 'Upgrade path',
+    );
+  }
+
+  public function setUp() {
+    // Path to the database dump files.
+    $this->databaseDumpFiles = array(
+      //drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.filled.database.php',
+      drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.statistics.database.php',
+    );
+    parent::setUp();
+
+    $this->uninstallModulesExcept(array('statistics'));
+  }
+
+  /**
+   * Test a successful upgrade.
+   */
+  public function testStatisticsUpgrade() {
+    $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
+  }
+}
