summaryrefslogtreecommitdiff
path: root/plugins/InternalID/Schema/Sqlite.php
diff options
context:
space:
mode:
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;');
+
+}