db constraint with unique remoteId if set, handle sync with tests

This commit is contained in:
2022-06-10 00:26:16 +02:00
parent f149b24802
commit c92077926e
14 changed files with 957 additions and 332 deletions

View File

@@ -26,9 +26,10 @@ use Symfony\Component\Serializer\Annotation as Serializer;
* The event/calendar in the user may have a different id than the mainUser. We add then fields to store the
* remote id of this event in the remote calendar.
*
* @ORM\Table(name="chill_calendar.invite", indexes={
* @ORM\Index(name="idx_calendar_invite_remote", columns={"remoteId"})
* })
* @ORM\Table(
* name="chill_calendar.invite",
* uniqueConstraints={@ORM\UniqueConstraint(name="idx_calendar_invite_remote", columns={"remoteId"}, options={"where": "remoteId <> ''"})}
* )
* @ORM\Entity
*/
class Invite implements TrackUpdateInterface, TrackCreationInterface