From 9bde377bbe85617dde280af985e033cf7de61803 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 9 Sep 2014 20:39:45 +0200 Subject: Start to implement task history and project activity --- app/Schema/Sqlite.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'app/Schema') diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 21b6ed4d..e18d35e9 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -4,7 +4,24 @@ namespace Schema; use Core\Security; -const VERSION = 24; +const VERSION = 25; + +function version_25($pdo) +{ + $pdo->exec(" + CREATE TABLE task_has_events ( + id INTEGER PRIMARY KEY, + date_creation INTEGER, + event_name TEXT NOT NULL, + creator_id INTEGER, + project_id INTEGER, + task_id INTEGER, + FOREIGN KEY(creator_id) REFERENCES users(id) ON DELETE CASCADE, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE, + FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE + ); + "); +} function version_24($pdo) { -- cgit v1.2.3