From 8e18c39db9dbb0d91e28006b972dbe331e6500b4 Mon Sep 17 00:00:00 2001 From: Lev Lazinskiy Date: Sun, 22 Jan 2017 09:39:30 -0800 Subject: Add date_modification to comments (PR #2950) --- app/Schema/Mysql.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/Schema/Mysql.php') diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index cc691d1f..6c1c9da6 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,15 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 118; +const VERSION = 119; + +function version_119(PDO $pdo) +{ + $pdo->exec('ALTER TABLE `comments` ADD COLUMN `date_modification` BIGINT(20)'); + $pdo->exec('UPDATE `comments` + SET `date_modification` = `date_creation` + WHERE `date_modification` IS NULL'); +} function version_118(PDO $pdo) { -- cgit v1.2.3