diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-16 20:51:59 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-16 20:51:59 -0500 |
commit | 8bf50d6a7ff460820efe098413626307216f8c34 (patch) | |
tree | 6c2f7ea359a57fa2c3adf9ae6c5bbe3d1882d7fa /app/Schema/Sqlite.php | |
parent | 4494566fc7a536232cf564b940dfae6b46c20bcd (diff) |
Add cumulative flow diagram
Diffstat (limited to 'app/Schema/Sqlite.php')
-rw-r--r-- | app/Schema/Sqlite.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 8571d924..cdc74465 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -5,7 +5,24 @@ namespace Schema; use Core\Security; use PDO; -const VERSION = 34; +const VERSION = 35; + +function version_35($pdo) +{ + $pdo->exec(" + CREATE TABLE project_daily_summaries ( + id INTEGER PRIMARY KEY, + day TEXT NOT NULL, + project_id INTEGER NOT NULL, + column_id INTEGER NOT NULL, + total INTEGER NOT NULL DEFAULT 0, + FOREIGN KEY(column_id) REFERENCES columns(id) ON DELETE CASCADE, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE + ) + "); + + $pdo->exec('CREATE UNIQUE INDEX project_daily_column_stats_idx ON project_daily_summaries(day, project_id, column_id)'); +} function version_34($pdo) { |