[DATABASE] Fix MariaDB schema verification

This commit is contained in:
Alexei Sorokin
2020-06-28 20:05:11 +03:00
committed by Diogo Peralta Cordeiro
parent 32a7cd6458
commit eb993df072
5 changed files with 141 additions and 97 deletions

View File

@@ -61,7 +61,7 @@ class Activitypub_rsa extends Managed_DataObject
],
'primary key' => ['profile_id'],
'foreign keys' => [
'activitypub_profile_profile_id_fkey' => ['profile', ['profile_id' => 'id']],
'activitypub_rsa_profile_id_fkey' => ['profile', ['profile_id' => 'id']],
],
];
}
@@ -182,7 +182,7 @@ class Activitypub_rsa extends Managed_DataObject
$apRSA = new Activitypub_rsa();
$apRSA->profile_id = $profile->getID();
$apRSA->public_key = $public_key;
$apRSA->modified = common_sql_now();
$apRSA->created = common_sql_now();
if (!$apRSA->update()) {
$apRSA->insert();
}