Gacha game centered around vore.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vore-gacha/migrations/committed/000006-unit-table.sql

25 lines
1.1 KiB

--! Previous: sha1:8243b031500fde9c022d6aada10a429496dc264d
--! Hash: sha1:8102b0362d2ae5b73ed1d56214f7fffa445c469e
--! Message: Unit table
--- Table of definitions of units that can be summoned.
CREATE TABLE IF NOT EXISTS Unit
(
--- The internal ID associated with this unit.
id SERIAL NOT NULL PRIMARY KEY,
--- The name of this unit.
name VARCHAR(50) NOT NULL,
--- The subtitle of this unit.
subtitle VARCHAR(50) NOT NULL,
--- The description of this unit.
description TEXT NOT NULL,
--- The tier of this unit.
tierId VARCHAR(8) NOT NULL REFERENCES UnitTier (id) ON DELETE RESTRICT ON UPDATE CASCADE,
--- The unit's base health when summoned for the first time.
baseHealth INT NOT NULL CHECK ( baseHealth > 0 ),
--- The unit's base strength when summoned for the first time.
baseStrength INT NOT NULL CHECK ( baseStrength > 0 ),
--- The combination of Name and Subtitle is unique among units, allowing for multiple versions of a unit.
UNIQUE (name, subtitle)
)