Added a bunch of mini features

Sorted worlds, add preview and add cards, added timestamps...
This commit is contained in:
Alexis
2025-03-03 22:27:42 +01:00
parent a83bc240b1
commit 922bcdc64b
15 changed files with 204 additions and 102 deletions

View File

@@ -44,6 +44,8 @@ create table public.worlds (
description text,
color app_colors default 'black',
state world_state default 'draft',
created_at timestamptz default now(),
updated_at timestamptz,
gm_id uuid references public.users on delete cascade
);
comment on table public.worlds is 'Worlds belonging to a single user ; a game master.';
@@ -66,6 +68,8 @@ create table public.calendars (
today json not null,
color app_colors default 'black',
state calendar_state default 'draft',
created_at timestamptz default now(),
updated_at timestamptz,
world_id bigint references public.worlds on delete cascade not null
);
comment on table public.calendars is 'Calendar settings and configuration attached to a single world.';
@@ -100,6 +104,8 @@ create table public.calendar_events (
category bigint references public.calendar_event_categories on delete cascade,
hidden boolean default false,
wiki text,
created_at timestamptz default now(),
updated_at timestamptz,
calendar_id bigint references public.calendars on delete cascade not null
);
comment on table public.calendar_events is 'Events linked to a world';
@@ -123,9 +129,11 @@ comment on table public.calendar_event_categories_links is 'Link tables for mult
-- Character categories
create table public.character_categories (
id bigint generated by default as identity primary key,
name text not null,
color app_colors default 'black',
id bigint generated by default as identity primary key,
name text not null,
color app_colors default 'black',
created_at timestamptz default now(),
updated_at timestamptz,
unique (name)
);
comment on table public.character_categories is 'Categories describing characters';
@@ -141,6 +149,8 @@ create table public.characters (
hidden_birth boolean,
hidden_death boolean,
wiki text,
created_at timestamptz default now(),
updated_at timestamptz,
world_id bigint references public.worlds on delete cascade not null
);
comment on table public.characters is 'Characters linked to a world';