From 9ded34f9d3d84fb1ea311c2fb3d935c91d4afddb Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 3 Feb 2020 21:29:36 +0100 Subject: Add sequence,added_at, and updated_at to events table; implement SEQUENCE in iCal export --- ical.php | 1 + install.sql | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ical.php b/ical.php index 92c7eb8..f3ad5b5 100644 --- a/ical.php +++ b/ical.php @@ -52,6 +52,7 @@ $events=isset($_GET['keywords']) ? get_events (explode (',',$_GET['keywords'])) foreach ($events as $event){ echo "BEGIN:VEVENT\r\n"; echo icalline ('UID','event-'.$event['id'].'@agenda.hebrewtools.org'); + echo icalline ('SEQUENCE',$event['sequence']); echo icalline ('SUMMARY',$event['title']); echo icalline ('LOCATION',$event['location']); echo icalline ('DTSTART',date ('Ymd',strtotime ($event['start_date']))); diff --git a/install.sql b/install.sql index 8eb299a..a81729d 100644 --- a/install.sql +++ b/install.sql @@ -1,5 +1,8 @@ CREATE TABLE `events` ( `id` int(11) NOT NULL, + `sequence` tinyint(4) NOT NULL DEFAULT '0', + `added_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `title` text NOT NULL, `location` text NOT NULL, `start_date` date NOT NULL, -- cgit v1.2.3