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/Postgres.php | |
| parent | 4494566fc7a536232cf564b940dfae6b46c20bcd (diff) | |
Add cumulative flow diagram
Diffstat (limited to 'app/Schema/Postgres.php')
| -rw-r--r-- | app/Schema/Postgres.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index f301f3e8..4ec3885c 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -5,7 +5,24 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 15; +const VERSION = 16; + +function version_16($pdo) +{ + $pdo->exec(" + CREATE TABLE project_daily_summaries ( + id SERIAL PRIMARY KEY, + day CHAR(10) 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_15($pdo) { |
