summaryrefslogtreecommitdiff
path: root/plugins/InternalID/Schema/Sqlite.php
diff options
context:
space:
mode:
authorDzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl>2020-01-15 16:07:19 +0100
committerDzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl>2020-01-15 16:07:19 +0100
commit95e7b1498f2c178383699f8d30208cc326b7a37b (patch)
treecc1fae78a1a807fcfce8d6539d373afd670f484d /plugins/InternalID/Schema/Sqlite.php
parentb6f34622b169652c57e7cabd8d11e28605f110c3 (diff)
Displaying internal project ID for tasks
Diffstat (limited to 'plugins/InternalID/Schema/Sqlite.php')
-rw-r--r--plugins/InternalID/Schema/Sqlite.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/InternalID/Schema/Sqlite.php b/plugins/InternalID/Schema/Sqlite.php
new file mode 100644
index 00000000..2c1f4f27
--- /dev/null
+++ b/plugins/InternalID/Schema/Sqlite.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace Kanboard\Plugin\InternalID\Schema;
+
+const VERSION = 1;
+
+function version_1($pdo) {
+
+ $pdo->exec('CREATE VIEW task_internal_id AS SELECT COUNT(t1.id) internal_id, t1.id id, t1.project_id project_id FROM tasks t1 JOIN tasks t2 ON t1.id >= t2.id AND t1.project_id = t2.project_id GROUP BY t1.id, t1.project_id;');
+
+}