summaryrefslogtreecommitdiff
path: root/app/Schema/Mysql.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-16 20:51:59 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-16 20:51:59 -0500
commit8bf50d6a7ff460820efe098413626307216f8c34 (patch)
tree6c2f7ea359a57fa2c3adf9ae6c5bbe3d1882d7fa /app/Schema/Mysql.php
parent4494566fc7a536232cf564b940dfae6b46c20bcd (diff)
Add cumulative flow diagram
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r--app/Schema/Mysql.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index 4f74f761..e73f6cf4 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -5,7 +5,25 @@ namespace Schema;
use PDO;
use Core\Security;
-const VERSION = 34;
+const VERSION = 35;
+
+function version_35($pdo)
+{
+ $pdo->exec("
+ CREATE TABLE project_daily_summaries (
+ id INT NOT NULL AUTO_INCREMENT,
+ day CHAR(10) NOT NULL,
+ project_id INT NOT NULL,
+ column_id INT NOT NULL,
+ total INT NOT NULL DEFAULT 0,
+ PRIMARY KEY(id),
+ FOREIGN KEY(column_id) REFERENCES columns(id) ON DELETE CASCADE,
+ FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE
+ ) ENGINE=InnoDB CHARSET=utf8
+ ");
+
+ $pdo->exec('CREATE UNIQUE INDEX project_daily_column_stats_idx ON project_daily_summaries(day, project_id, column_id)');
+}
function version_34($pdo)
{