Fixed long RLS name

This commit is contained in:
Alexis
2025-03-15 14:52:26 +01:00
parent 6992bca957
commit 7f3a2b8d56
2 changed files with 5 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ comment on table public.calendar_months is 'A calendar month.';
create table public.calendar_event_categories ( create table public.calendar_event_categories (
id bigint generated by default as identity primary key, id bigint generated by default as identity primary key,
name text not null, name text not null,
color app_colors default 'black', color app_colors default 'white',
calendar_id bigint references public.calendars on delete cascade not null calendar_id bigint references public.calendars on delete cascade not null
); );
comment on table public.calendar_event_categories is 'Categories describing events.'; comment on table public.calendar_event_categories is 'Categories describing events.';
@@ -136,7 +136,7 @@ comment on table public.calendar_event_categories_links is 'Link tables for mult
create table public.character_categories ( create table public.character_categories (
id bigint generated by default as identity primary key, id bigint generated by default as identity primary key,
name text not null, name text not null,
color app_colors default 'black', color app_colors default 'white',
created_at timestamptz default now(), created_at timestamptz default now(),
updated_at timestamptz, updated_at timestamptz,
world_id bigint references public.worlds on delete cascade not null world_id bigint references public.worlds on delete cascade not null
@@ -335,7 +335,7 @@ create policy "Allow GMs to delete their calendar's months"
); );
-- Event policies -- Event policies
create policy "Allow anonymous access to non-hidden events in published calendars" on public.calendar_events create policy "Allow anon access to non-hidden events in published calendars" on public.calendar_events
for select for select
to authenticated, anon to authenticated, anon
using ( using (

View File

@@ -2,7 +2,7 @@ insert into public.role_permissions (role, permission) values ('sa', 'events.see
insert into public.role_permissions (role, permission) values ('sa', 'users.ban'); insert into public.role_permissions (role, permission) values ('sa', 'users.ban');
-- Worlds -- Worlds
insert into public.worlds (name, description, color, state) values ('Léïm', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis aliquet congue aliquet. Curabitur eu iaculis diam. Nunc iaculis nibh orci, eu semper nunc congue congue. Praesent euismod tortor eget metus tristique lobortis vel in risus. In volutpat ligula orci, id pharetra lectus egestas at.', 'black', 'published'); insert into public.worlds (name, description, color, state) values ('Léïm', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis aliquet congue aliquet. Curabitur eu iaculis diam. Nunc iaculis nibh orci, eu semper nunc congue congue. Praesent euismod tortor eget metus tristique lobortis vel in risus. In volutpat ligula orci, id pharetra lectus egestas at.', 'white', 'published');
-- Character categories -- Character categories
insert into public.character_categories (name, color, world_id) values ('Joueur', 'white', 1); insert into public.character_categories (name, color, world_id) values ('Joueur', 'white', 1);
@@ -19,7 +19,7 @@ insert into public.character_categories (name, color, world_id) values ('Activis
insert into public.character_categories (name, color, world_id) values ('Commerçant', 'amber', 1); insert into public.character_categories (name, color, world_id) values ('Commerçant', 'amber', 1);
-- Worlds' calendars -- Worlds' calendars
insert into public.calendars (world_id, name, today, state) values (1, 'Calendrier solaire', '{ "day": 23, "month": 8, "year": 3209 }', 'published'); insert into public.calendars (world_id, name, today, color, state) values (1, 'Calendrier solaire', '{ "day": 23, "month": 8, "year": 3209 }', 'white', 'published');
-- Calendar's months -- Calendar's months
insert into public.calendar_months (name, days, position, calendar_id) values ('Jalen', 32, 1, 1); insert into public.calendar_months (name, days, position, calendar_id) values ('Jalen', 32, 1, 1);