From 8bf50d6a7ff460820efe098413626307216f8c34 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 16 Nov 2014 20:51:59 -0500 Subject: Add cumulative flow diagram --- app/Schema/Mysql.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'app/Schema/Mysql.php') 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) { -- cgit v1.2.3