summaryrefslogtreecommitdiff
path: root/models/schema.php
diff options
context:
space:
mode:
Diffstat (limited to 'models/schema.php')
-rw-r--r--models/schema.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/models/schema.php b/models/schema.php
index f98f0e69..2c3ba7e8 100644
--- a/models/schema.php
+++ b/models/schema.php
@@ -2,6 +2,21 @@
namespace Schema;
+function version_8($pdo)
+{
+ $pdo->exec(
+ 'CREATE TABLE comments (
+ id INTEGER PRIMARY KEY,
+ task_id INTEGER,
+ user_id INTEGER,
+ date INTEGER,
+ comment TEXT,
+ FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE,
+ FOREIGN KEY(user_id) REFERENCES tasks(id) ON DELETE CASCADE
+ )'
+ );
+}
+
function version_7($pdo)
{
$pdo->exec("