Condensed schemas into json, will address later

This commit is contained in:
Benjamin Sherriff
2023-10-04 10:00:39 -04:00
parent 25f52fb46d
commit 2b7ec386a0
9 changed files with 557 additions and 647 deletions

View File

@@ -1,30 +1,5 @@
CREATE TABLE IF NOT EXISTS spells (
id INTEGER GENERATED ALWAYS AS IDENTITY,
name TEXT NOT NULL,
school TEXT NOT NULL,
level INTEGER NOT NULL,
ritual BOOLEAN DEFAULT FALSE,
casting_time_amount INTEGER NOT NULL,
casting_time_unit TEXT NOT NULL,
saving_throw TEXT[],
attack_type TEXT,
damage_type TEXT,
conditions TEXT[],
range_type TEXT NOT NULL,
range_amount INTEGER,
range_unit TEXT,
area_type TEXT,
area_amount INTEGER,
area_unit TEXT,
components_verbal BOOLEAN DEFAULT FALSE,
components_somatic BOOLEAN DEFAULT FALSE,
components_material BOOLEAN DEFAULT FALSE,
components_materials_needed TEXT,
components_materials_cost INTEGER,
components_materials_consumed BOOLEAN DEFAULT FALSE,
durations JSONB NOT NULL,
classes TEXT[] NOT NULL,
sources JSONB NOT NULL,
tags TEXT[],
description JSONB NOT NULL
data JSONB NOT NULL
);