Merge pull request #8661 from annando/verb-order

Ensure unified order of 'verb' records
This commit is contained in:
Hypolite Petovan 2020-05-19 09:15:09 -04:00 committed by GitHub
commit ed3416dcec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1004,6 +1004,12 @@ class DBStructure
*/
public static function checkInitialValues()
{
if (self::existsTable('verb') && !DBA::exists('verb', ['id' => 1])) {
foreach (Item::ACTIVITIES as $index => $activity) {
DBA::insert('verb', ['id' => $index + 1, 'name' => $activity], true);
}
}
if (self::existsTable('contact') && !DBA::exists('contact', ['id' => 0])) {
DBA::insert('contact', ['nurl' => '']);
$lastid = DBA::lastInsertId();