Add subtasks

This commit is contained in:
Frédéric Guillot
2014-05-25 15:02:27 -04:00
parent 9ddeb5d978
commit f9753e91d2
22 changed files with 708 additions and 19 deletions

View File

@@ -2,7 +2,24 @@
namespace Schema;
const VERSION = 17;
const VERSION = 18;
function version_18($pdo)
{
$pdo->exec("
CREATE TABLE task_has_subtasks (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(255),
status INT DEFAULT 0,
time_estimated INT DEFAULT 0,
time_spent INT DEFAULT 0,
task_id INT,
user_id INT,
PRIMARY KEY (id),
FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE
) ENGINE=InnoDB CHARSET=utf8"
);
}
function version_17($pdo)
{

View File

@@ -2,7 +2,23 @@
namespace Schema;
const VERSION = 17;
const VERSION = 18;
function version_18($pdo)
{
$pdo->exec("
CREATE TABLE task_has_subtasks (
id INTEGER PRIMARY KEY,
title TEXT COLLATE NOCASE,
status INTEGER DEFAULT 0,
time_estimated INTEGER DEFAULT 0,
time_spent INTEGER DEFAULT 0,
task_id INTEGER,
user_id INTEGER,
FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE
)"
);
}
function version_17($pdo)
{