Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

fixed deleting recurring appointments being broken #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikselven
Copy link

Fix for #65

Changed action for ON DELETE part of foreign key between relations repeated_events and repeated_events_log_entries to CASCADE, as this is probably what you want your DBMS to do when deleting recurring appointments.

The change introduced with this PR only applies when the Calcifer database is newly generated. To fix the problem for an already deployed database, use the following SQL statement and replace <fk_name> with the actual name of the problematic foreign key.

ALTER TABLE repeating_events_log_entries
    DROP CONSTRAINT <fk_name>,
    ADD CONSTRAINT <fk_name>
        FOREIGN KEY (repeating_events_id) REFERENCES repeating_events(id) ON DELETE CASCADE;

@enko
Copy link
Member

enko commented Dec 18, 2017

@ikselven it would be great if you could add a migrations file for recreating the foreign key:

https://github.com/HackspaceJena/calcifer/tree/master/app/DoctrineMigrations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants