30 lines
859 B
SQL
30 lines
859 B
SQL
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
|
|
); |