fixed deleting recurring appointments being broken #68

Open
ikselven wants to merge 1 commit from fix-deleting-appointments into master
ikselven commented 2017-12-16 19:23:14 +01:00 (Migrated from github.com)

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;
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 commented 2017-12-18 11:29:32 +01:00 (Migrated from github.com)

@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

@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
This repo is archived. You cannot comment on pull requests.
No description provided.