forked from GNUsocial/gnu-social
[RemoteURLToAttachment] Fix primary key, relation is: One Attachment Has Many URLs, One URL Has One Attachment
This commit is contained in:
parent
78c5c4b084
commit
33cc9386d2
@ -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'],
|
'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'],
|
'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' => [
|
'indexes' => [
|
||||||
'remoteurl_id_idx' => ['remoteurl_id'],
|
'remoteurl_id_idx' => ['remoteurl_id'],
|
||||||
'attachment_id_idx' => ['attachment_id'],
|
'attachment_id_idx' => ['attachment_id'],
|
||||||
|
Loading…
Reference in New Issue
Block a user