Skip to content

Commit

Permalink
fix(Felamimail/Update): fix missing account creation time
Browse files Browse the repository at this point in the history
  • Loading branch information
ccheng-dev committed Nov 28, 2024
1 parent 9819fa8 commit 29cbbcb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions tine20/Felamimail/Setup/Update/16.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Felamimail_Setup_Update_16 extends Setup_Update_Abstract
const RELEASE016_UPDATE007 = __CLASS__ . '::update007';
const RELEASE016_UPDATE008 = __CLASS__ . '::update008';
const RELEASE016_UPDATE009 = __CLASS__ . '::update009';
const RELEASE016_UPDATE010 = __CLASS__ . '::update010';


static protected $_allUpdates = [
Expand Down Expand Up @@ -69,6 +70,10 @@ class Felamimail_Setup_Update_16 extends Setup_Update_Abstract
self::CLASS_CONST => self::class,
self::FUNCTION_CONST => 'update009',
],
self::RELEASE016_UPDATE010 => [
self::CLASS_CONST => self::class,
self::FUNCTION_CONST => 'update010',
],
],
];

Expand Down Expand Up @@ -332,4 +337,13 @@ public function update009()

$this->addApplicationUpdate('Felamimail', '16.9', self::RELEASE016_UPDATE009);
}

public function update010()
{
$this->getDb()->query('UPDATE ' . SQL_TABLE_PREFIX . 'felamimail_account SET creation_time = NOW() WHERE creation_time IS NULL');
$this->getDb()->query('UPDATE ' . SQL_TABLE_PREFIX . 'felamimail_account SET created_by = "' .
Tinebase_Core::getUser()->getId() . '" WHERE created_by IS NULL');

$this->addApplicationUpdate('Felamimail', '16.10', self::RELEASE016_UPDATE010);
}
}
2 changes: 1 addition & 1 deletion tine20/Felamimail/Setup/setup.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<application>
<name>Felamimail</name>
<version>16.9</version>
<version>16.10</version>
<order>30</order>
<status>enabled</status>
<tables>
Expand Down

0 comments on commit 29cbbcb

Please sign in to comment.