summaryrefslogtreecommitdiff
path: root/plugins/InternalID/Schema/Sqlite.php
blob: 2c1f4f279c13e5a5fbe9a030df8c1e4266552b9d (plain)
1
2
3
4
5
6
7
8
9
10
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;');

}