Added server limit to event title and description

This commit is contained in:
Alexis
2024-11-24 15:30:50 +01:00
parent 66e6f84f8b
commit 5258ed3f2a

View File

@@ -88,6 +88,14 @@ create table public.calendar_events (
); );
comment on table public.calendar_events is 'Events linked to a world'; comment on table public.calendar_events is 'Events linked to a world';
-- Calendar Events restrictions
alter table public.calendar_events
add constraint calendar_events_maxlen_check
check (
char_length(title) <= 240 AND
(description IS NULL OR char_length(description) <= 1200)
);
-- Link table for events - categories -- Link table for events - categories
create table public.calendar_event_categories_links ( create table public.calendar_event_categories_links (
calendar_event_id bigint references public.calendar_events on delete cascade, calendar_event_id bigint references public.calendar_events on delete cascade,