summaryrefslogtreecommitdiff
path: root/app/Schema/Sqlite.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Schema/Sqlite.php')
-rw-r--r--app/Schema/Sqlite.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index 534c3f3a..f430c00b 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -6,7 +6,30 @@ use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
use PDO;
-const VERSION = 91;
+const VERSION = 92;
+
+function version_92(PDO $pdo)
+{
+ $rq = $pdo->prepare('SELECT * FROM actions');
+ $rq->execute();
+ $rows = $rq->fetchAll(PDO::FETCH_ASSOC) ?: array();
+
+ $rq = $pdo->prepare('UPDATE actions SET action_name=? WHERE id=?');
+
+ foreach ($rows as $row) {
+ if ($row['action_name'] === 'TaskAssignCurrentUser' && $row['event_name'] === 'task.move.column') {
+ $row['action_name'] = '\Kanboard\Action\TaskAssignCurrentUserColumn';
+ } elseif ($row['action_name'] === 'TaskClose' && $row['event_name'] === 'task.move.column') {
+ $row['action_name'] = '\Kanboard\Action\TaskCloseColumn';
+ } elseif ($row['action_name'] === 'TaskLogMoveAnotherColumn') {
+ $row['action_name'] = '\Kanboard\Action\CommentCreationMoveTaskColumn';
+ } elseif ($row['action_name']{0} !== '\\') {
+ $row['action_name'] = '\Kanboard\Action\\'.$row['action_name'];
+ }
+
+ $rq->execute(array($row['action_name'], $row['id']));
+ }
+}
function version_91(PDO $pdo)
{