Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-11-03 20:23:15 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-11-03 20:23:15 +0300
commit36c9af187e36931fda4d29a0937d00546edb415e (patch)
tree8b6a866027de8ea0a41c592e610c36d64750ac92
parent3f49998533e25d79b6d269736a4196e20a0deb54 (diff)
- simplifying schema for the option table
-rw-r--r--core/Option.php12
-rw-r--r--core/Piwik.php3
-rw-r--r--core/Updater.php2
-rw-r--r--plugins/Installation/Controller.php7
-rw-r--r--tests/core/PHP_Related.test.php5
5 files changed, 12 insertions, 17 deletions
diff --git a/core/Option.php b/core/Option.php
index a34a3e8f73..d7158509d1 100644
--- a/core/Option.php
+++ b/core/Option.php
@@ -1,6 +1,4 @@
<?php
-
-
//TODO
// - design Caching, in terms of API, piwik.php loading data for a given website (from one file)
// - design Options, how WP plugins make use of it, reuse same pattern
@@ -28,13 +26,3 @@ function Piwik_UpdateOption($name, $value)
}
}
-/**
- *
- CREATE TABLE `piwik_trunk`.`option` (
-`idoption` BIGINT NOT NULL AUTO_INCREMENT ,
-`option_name` VARCHAR( 64 ) NOT NULL ,
-`option_value` LONGTEXT NOT NULL ,
-PRIMARY KEY ( `idoption` , `option_name` )
-) ENGINE = MYISAM
- *
- */
diff --git a/core/Piwik.php b/core/Piwik.php
index 16cb618a0b..9e0ab7c0f8 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -601,10 +601,9 @@ class Piwik
",
'option' => "CREATE TABLE {$prefixTables}option (
- idoption BIGINT NOT NULL AUTO_INCREMENT ,
option_name VARCHAR( 64 ) NOT NULL ,
option_value LONGTEXT NOT NULL ,
- PRIMARY KEY ( idoption , option_name )
+ PRIMARY KEY ( option_name )
)
",
diff --git a/core/Updater.php b/core/Updater.php
index 0363b71038..2b26e333c5 100644
--- a/core/Updater.php
+++ b/core/Updater.php
@@ -142,7 +142,7 @@ class Piwik_Updater
}
else
{
- $currentVersion = '0.01';
+ $currentVersion = '0.0.1';
}
$this->recordComponentSuccessfullyUpdated($name, $currentVersion);
}
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 4536cebbb6..eccc3f33b9 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -203,8 +203,11 @@ class Piwik_Installation_Controller extends Piwik_Controller
{
Piwik::createTables();
Piwik::createAnonymousUser();
- Piwik::createTablesIndex();
-
+ Piwik::createTablesIndex();
+ require_once "Version.php";
+ require_once "Updater.php";
+ $updater = new Piwik_Updater();
+ $updater->recordComponentSuccessfullyUpdated('core', Piwik_Version::VERSION);
$view->tablesCreated = true;
$view->showNextStep = true;
}
diff --git a/tests/core/PHP_Related.test.php b/tests/core/PHP_Related.test.php
index 1d7709f5ab..5b71ac84c5 100644
--- a/tests/core/PHP_Related.test.php
+++ b/tests/core/PHP_Related.test.php
@@ -24,6 +24,11 @@ class Test_PHP_Related extends UnitTestCase
{
}
+ function test_versionTrailingZero()
+ {
+ $this->assertTrue(version_compare('0.1','0.01') == 0);
+ }
+
function test_equal()
{
//aaaaaaaaaaaahhhhhhhhhhhh