Page MenuHomeGitPull.it

Allow to drop a whole Calendar
Closed, ResolvedPublic

Description

It would be awesome to drop a whole Calendar to eventually re-create it.

Bonus point: alert pending users.

Revisions and Commits

Event Timeline

valerio.bozzolan created this task.
valerio.bozzolan added a commit: Restricted Diffusion Commit.May 11 2021, 17:00

I'm inclined to mark this as resolved because I've tested it enough in beta, but let's reopen it if something goes wrong in the real world.

valerio.bozzolan added a commit: Restricted Diffusion Commit.Jun 4 2021, 16:02

The deletion is broken if it exists a Calendarslot attached to that Calendar (usual situation):

[Thu Jun 10 09:25:15.305320 2021] [:error] [pid 25924] [client 5.90.3.216:6931] PHP Fatal error:  Uncaught SucklessException: error executing the query n. 4 |DELETE `calendarslottype` FROM `calendarslottype` AS `calendarslottype` WHERE calendarslottype.calendar_ID = 139 | error: Cannot delete or update a parent row: a foreign key constraint fails (`landscapefor`.`calendarslot`, CONSTRAINT `calendarslot_ibfk_calendarslottype` FOREIGN KEY (`calendarslottype_ID`) REFERENCES `calendarslottype` (`calendarslottype_ID`)) in /usr/share/php/suckless-php/class-DB.php:140\nStack trace:\n#0 /usr/share/php/suckless-php/class-Query.php(832): DB->query('DELETE `calenda...')\n#1 /usr/share/php/suckless-php/class-Query.php(660): Query->runDangerousQuery('DELETE `calenda...')\n#2 /home/www-data/landscapefor/atlas/beta/calendar-remove.php(53): Query->delete()\n#3 {main}\n  thrown in /usr/share/php/suckless-php/class-DB.php on line 140, referer: https://beta.atlas.landscapefor.eu/calendar-remove.php?id=139
valerio.bozzolan closed this task as Resolved by committing Restricted Diffusion Commit.Jun 10 2021, 10:33
valerio.bozzolan added a commit: Restricted Diffusion Commit.
valerio.bozzolan added a commit: Restricted Diffusion Commit.
valerio.bozzolan added a commit: Restricted Diffusion Commit.Jun 10 2021, 18:15