summaryrefslogtreecommitdiff
path: root/schemas/sqlite.php
diff options
context:
space:
mode:
Diffstat (limited to 'schemas/sqlite.php')
-rw-r--r--schemas/sqlite.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/schemas/sqlite.php b/schemas/sqlite.php
index 94580235..b444faa5 100644
--- a/schemas/sqlite.php
+++ b/schemas/sqlite.php
@@ -2,6 +2,21 @@
namespace Schema;
+function version_16($pdo)
+{
+ $pdo->exec("
+ CREATE TABLE project_has_categories (
+ id INTEGER PRIMARY KEY,
+ name TEXT COLLATE NOCASE,
+ project_id INT,
+ UNIQUE (project_id, name),
+ FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE
+ )"
+ );
+
+ $pdo->exec("ALTER TABLE tasks ADD COLUMN category_id INTEGER DEFAULT 0");
+}
+
function version_15($pdo)
{
$pdo->exec("ALTER TABLE projects ADD COLUMN last_modified INTEGER DEFAULT 0");