[RemoteURLToAttachment] Fix primary key, relation is: One Attachment Has Many URLs, One URL Has One Attachment

This commit is contained in:
Diogo Peralta Cordeiro 2021-08-12 00:37:01 +01:00 committed by Hugo Sales
parent 78c5c4b084
commit 33cc9386d2
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class RemoteURLToAttachment extends Entity
'attachment_id' => ['type' => 'int', 'foreign key' => true, 'target' => 'Attachment.id', 'multiplicity' => 'one to one', 'name' => 'attachment_to_note_attachment_id_fkey', 'not null' => true, 'description' => 'id of attachment'],
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
],
'primary key' => ['remoteurl_id', 'attachment_id'],
'primary key' => ['remoteurl_id'],
'indexes' => [
'remoteurl_id_idx' => ['remoteurl_id'],
'attachment_id_idx' => ['attachment_id'],