summaryrefslogtreecommitdiff
path: root/app/Schema/Mysql.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-10 16:51:44 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-10 16:51:44 +0200
commitcede5d5434e4e50145daf2413c962a335c13cc99 (patch)
tree2e967e7c95884f9cbab880ff7aedc72466e9d47a /app/Schema/Mysql.php
parent28ff8dad91c9e3c25f6a3b5398ae15f2a1ef95cd (diff)
Fix Mysql and Postgresql bug
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r--app/Schema/Mysql.php55
1 files changed, 9 insertions, 46 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index 9ab12a1a..2d3f993e 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -19,8 +19,9 @@ function version_25($pdo)
data TEXT,
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
- );
+ FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE,
+ PRIMARY KEY (id)
+ ) ENGINE=InnoDB CHARSET=utf8
");
$pdo->exec("
@@ -36,8 +37,9 @@ function version_25($pdo)
FOREIGN KEY(creator_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
FOREIGN KEY(subtask_id) REFERENCES task_has_subtasks(id) ON DELETE CASCADE,
- FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE
- );
+ FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE,
+ PRIMARY KEY (id)
+ ) ENGINE=InnoDB CHARSET=utf8
");
$pdo->exec("
@@ -53,8 +55,9 @@ function version_25($pdo)
FOREIGN KEY(creator_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
FOREIGN KEY(comment_id) REFERENCES comments(id) ON DELETE CASCADE,
- FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE
- );
+ FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE,
+ PRIMARY KEY (id)
+ ) ENGINE=InnoDB CHARSET=utf8
");
}
@@ -197,46 +200,6 @@ function version_12($pdo)
);
}
-function version_11($pdo)
-{
-}
-
-function version_10($pdo)
-{
-}
-
-function version_9($pdo)
-{
-}
-
-function version_8($pdo)
-{
-}
-
-function version_7($pdo)
-{
-}
-
-function version_6($pdo)
-{
-}
-
-function version_5($pdo)
-{
-}
-
-function version_4($pdo)
-{
-}
-
-function version_3($pdo)
-{
-}
-
-function version_2($pdo)
-{
-}
-
function version_1($pdo)
{
$pdo->exec("